zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] anmolnar commented on a change in pull request #996: ZOOKEEPER-3240: Close socket on Learner shutdown to avoid dangling so…
Date Sat, 22 Jun 2019 14:09:52 GMT
anmolnar commented on a change in pull request #996: ZOOKEEPER-3240: Close socket on Learner
shutdown to avoid dangling so…
URL: https://github.com/apache/zookeeper/pull/996#discussion_r296446857
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java
 ##########
 @@ -827,7 +827,10 @@ public void testFailedTxnAsPartOfQuorumLoss() throws Exception {
         int leader = servers.findLeader();
         Map<Long, Proposal> outstanding =  servers.mt[leader].main.quorumPeer.leader.outstandingProposals;
         // increase the tick time to delay the leader going to looking
+        int previousTick = servers.mt[leader].main.quorumPeer.tickTime;
         servers.mt[leader].main.quorumPeer.tickTime = LEADER_TIMEOUT_MS;
+        // let the previous tick on the leader exhaust itself so the new tick time takes
effect
+        Thread.sleep(previousTick);
 
 Review comment:
   How is this change related to this patch?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message