From d15af1ccbd00dd8e070aace8592f2c8f40fb25c8 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sat, 18 Feb 2012 01:31:11 +0000 Subject: [PATCH] fail if we don't see recovering shard flip to active and correct doc count checks (distrib=false) git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1245835 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/org/apache/solr/cloud/RecoveryZkTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java index 2ee8fde3a29..17d9be7a149 100644 --- a/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/RecoveryZkTest.java @@ -81,7 +81,7 @@ public class RecoveryZkTest extends FullSolrCloudTest { // make sure replication can start Thread.sleep(1500); - waitForRecoveriesToFinish(false); + waitForRecoveriesToFinish(DEFAULT_COLLECTION, zkStateReader, false, true); // stop indexing threads indexThread.safeStop(); @@ -97,9 +97,10 @@ public class RecoveryZkTest extends FullSolrCloudTest { // test that leader and replica have same doc count checkShardConsistency("shard1", false); - - long client1Docs = shardToClient.get("shard1").get(0).query(new SolrQuery("*:*")).getResults().getNumFound(); - long client2Docs = shardToClient.get("shard1").get(1).query(new SolrQuery("*:*")).getResults().getNumFound(); + SolrQuery query = new SolrQuery("*:*"); + query.setParam("distrib", "false"); + long client1Docs = shardToClient.get("shard1").get(0).query(query).getResults().getNumFound(); + long client2Docs = shardToClient.get("shard1").get(1).query(query).getResults().getNumFound(); assertTrue(client1Docs > 0); assertEquals(client1Docs, client2Docs);