You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/07/30 11:42:15 UTC

[GitHub] [zookeeper] tamaashu commented on a change in pull request #1417: ZOOKEEPER-3872: Upgrade jUnit in ZooKeeper-server

tamaashu commented on a change in pull request #1417:
URL: https://github.com/apache/zookeeper/pull/1417#discussion_r462937676



##########
File path: zookeeper-server/src/test/java/org/apache/zookeeper/ClientRequestTimeoutTest.java
##########
@@ -19,78 +19,84 @@
 package org.apache.zookeeper;
 
 import static org.apache.zookeeper.test.ClientBase.CONNECTION_TIMEOUT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTimeout;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 import java.io.IOException;
+import java.time.Duration;
 import org.apache.zookeeper.ZooDefs.Ids;
 import org.apache.zookeeper.client.HostProvider;
 import org.apache.zookeeper.client.ZKClientConfig;
 import org.apache.zookeeper.server.quorum.QuorumPeerTestBase;
 import org.apache.zookeeper.test.ClientBase;
 import org.apache.zookeeper.test.ClientBase.CountdownWatcher;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class ClientRequestTimeoutTest extends QuorumPeerTestBase {
 
     private static final int SERVER_COUNT = 3;
     private boolean dropPacket = false;
     private int dropPacketType = ZooDefs.OpCode.create;
 
-    @Test(timeout = 120000)
+    @Test

Review comment:
       assertTimeout is stable, so I preferred to use it.
   But I can try it out.




----------------------------------------------------------------
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