소스 검색

ZOOKEEPER-3157: Improve FuzzySnapshotRelatedTest to avoid flaky due to issues like connection loss

Quick fix to make the test more reliable.

Author: Andor Molnar <andor@apache.org>

Reviewers: fangmin@apache.org, eolivelli@gmail.com, andor@apache.org

Closes #657 from anmolnar/ZOOKEEPER-3157
Andor Molnar 6 년 전
부모
커밋
00c4c11853
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/FuzzySnapshotRelatedTest.java

+ 1 - 0
zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/FuzzySnapshotRelatedTest.java

@@ -227,6 +227,7 @@ public class FuzzySnapshotRelatedTest extends QuorumPeerTestBase {
 
         LOG.info("Restarting follower A to load snapshot");
         mt[followerA].shutdown();
+        QuorumPeerMainTest.waitForOne(zk[followerA], States.CONNECTING);
         mt[followerA].start();
         QuorumPeerMainTest.waitForOne(zk[followerA], States.CONNECTED);