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



##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
##########
@@ -117,19 +116,21 @@ public void testPingWrongServer() {
     InternalDistributedMember server2ID = server2.invoke("get ID", () -> 
cache.getMyId());
     pool = (PoolImpl) createClientCache(NetworkUtils.getServerHostName(), 
PORT1);
     // send the ping to server1 but use server2's identifier so the ping will 
be forwarded
-
     ClientProxyMembershipID proxyID = server1.invoke(
         () -> 
CacheClientNotifier.getInstance().getClientProxies().iterator().next().getProxyID());
     logger.info("ProxyID is : " + proxyID);

Review comment:
       done!

##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
##########
@@ -117,19 +116,21 @@ public void testPingWrongServer() {
     InternalDistributedMember server2ID = server2.invoke("get ID", () -> 
cache.getMyId());
     pool = (PoolImpl) createClientCache(NetworkUtils.getServerHostName(), 
PORT1);
     // send the ping to server1 but use server2's identifier so the ping will 
be forwarded
-
     ClientProxyMembershipID proxyID = server1.invoke(
         () -> 
CacheClientNotifier.getInstance().getClientProxies().iterator().next().getProxyID());
     logger.info("ProxyID is : " + proxyID);
     server2.invoke(() -> {
       
assertThat(ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().contains(proxyID))
           .isFalse();
-      assertEquals(0, 
ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size());
+      
assertThat(ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size())
+          .isEqualTo(0);
     });
     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").untilAsserted(() -> assertThat(
+          
ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size())
+              .isEqualTo(1));
       ClientProxyMembershipID proxyIDFound =
           
ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().iterator().next();
       logger.info("ProxyID found in clientHealthMonitor: " + proxyIDFound);

Review comment:
       done!




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to