You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/25 11:52:33 UTC

[GitHub] [geode] jujoramos commented on a change in pull request #5303: GEODE-8176: Fix for flaky testPingWrongServer

jujoramos commented on a change in pull request #5303:
URL: https://github.com/apache/geode/pull/5303#discussion_r445500467



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
##########
@@ -129,7 +130,9 @@ public void testPingWrongServer() {
     PingOp.execute(pool, new ServerLocation(NetworkUtils.getServerHostName(), PORT1), server2ID);
     // if the ping made it to server2 it will have the client's ID in its health monitor
     server2.invoke(() -> {
-      assertEquals(1, ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size());
+      await("For heartbeat to be received").timeout(Duration.ofMinutes(1))

Review comment:
       Please use the default timeout (5 minutes) set by `GeodeAwaitility` instead: `await().untilAsserted()` (without the `timeout`).

##########
File path: geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
##########
@@ -20,6 +20,8 @@
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;

Review comment:
       The current preferred approach is to always use `org.assertj.core.api.Assertions` instead of `org.junit.Assert`, can you change it?.




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