Skip to content

Commit 0f8decd

Browse files
committed
BasicDistributedZk2Test - wait for ZK connection to come back
1 parent d96c685 commit 0f8decd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZk2TestBase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ public void test() throws Exception {
149149
// expire a session...
150150
CloudJettyRunner cloudJetty = shardToJetty.get(SHARD1).get(0);
151151
chaosMonkey.expireSession(cloudJetty.jetty);
152+
// Wait until the jetty is reconnected, otherwise the following index command could fail
153+
cloudJetty
154+
.jetty
155+
.getCoreContainer()
156+
.getZkController()
157+
.getZkClient()
158+
.getCuratorFramework()
159+
.blockUntilConnected(50, TimeUnit.MILLISECONDS);
152160

153161
indexr("id", docId + 1, t1, "slip this doc in");
154162

0 commit comments

Comments
 (0)