From 1a715dd4d69ca8cfbbd50d03e012c4aaec7ddf6e Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sun, 19 Jan 2014 23:23:07 +0000 Subject: [PATCH] SOLR-5608: Harden test. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1559600 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/solr/cloud/CollectionsAPIDistributedZkTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java index 3579f4bfd7a..5a5d7e22ff6 100644 --- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java @@ -375,6 +375,11 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa ChaosMonkey.stop(jettys.get(0)); ChaosMonkey.stop(jettys.get(1)); + // wait for leaders to settle out + for (int i = 1; i < 4; i++) { + cloudClient.getZkStateReader().getLeaderRetry("halfdeletedcollection2", "shard" + i); + } + baseUrl = getBaseUrl((HttpSolrServer) clients.get(2)); // remove a collection @@ -387,7 +392,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa createNewSolrServer("", baseUrl).request(request); cloudClient.getZkStateReader().updateClusterState(true); - assertFalse(cloudClient.getZkStateReader().getClusterState().hasCollection("halfdeletedcollection2")); + assertFalse("Still found collection that should be gone", cloudClient.getZkStateReader().getClusterState().hasCollection("halfdeletedcollection2")); }