From e5fc7da2a2e59c76891615ee8232dc44b13e65c5 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Sun, 14 Jul 2013 18:41:40 +0000 Subject: [PATCH] SOLR-4997: Call commit before checking shard consistency git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1503019 13f79535-47bb-0310-9956-ffa450edef68 --- .../core/src/test/org/apache/solr/cloud/ShardSplitTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java b/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java index 9df06ed0dc0..e5f4d149000 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java @@ -202,12 +202,12 @@ public class ShardSplitTest extends BasicDistributedZkTest { assertEquals("Wrong number of replicas created for shard1_0", numReplicas, slice1_0.getReplicas().size()); assertEquals("Wrong number of replicas created for shard1_1", numReplicas, slice1_1.getReplicas().size()); + commit(); + // can't use checkShardConsistency because it insists on jettys and clients for each shard checkSubShardConsistency(SHARD1_0); checkSubShardConsistency(SHARD1_1); - commit(); - SolrQuery query = new SolrQuery("*:*").setRows(1000).setFields("id", "_version_"); query.set("distrib", false); @@ -224,7 +224,7 @@ public class ShardSplitTest extends BasicDistributedZkTest { logDebugHelp(docCounts, response, shard10Count, response2, shard11Count); assertEquals("Wrong doc count on shard1_0", docCounts[0], shard10Count); - //assertEquals("Wrong doc count on shard1_1", docCounts[1], shard11Count); + assertEquals("Wrong doc count on shard1_1", docCounts[1], shard11Count); } protected void checkSubShardConsistency(String shard) throws SolrServerException {