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
This commit is contained in:
Mark Robert Miller 2012-02-18 01:31:11 +00:00
parent 8ff8ea00bb
commit d15af1ccbd
1 changed files with 5 additions and 4 deletions

View File

@ -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);