albertogpz commented on a change in pull request #7330:
URL: https://github.com/apache/geode/pull/7330#discussion_r812112607



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/cache/wan/internal/cli/commands/WanCopyRegionCommandDUnitTest.java
##########
@@ -1460,11 +1460,15 @@ public void createServersAndRegions(int locatorPort, 
List<VM> servers,
   }
 
   private void waitForWanCopyRegionCommandToStart(boolean useParallel, boolean 
usePartitionedRegion,
-      List<VM> servers) {
+      List<VM> servers) throws InterruptedException {
+    // Wait for the command execution to be registered in the service
     final int executionsExpected = useParallel && usePartitionedRegion ? 
servers.size() : 1;
     await().untilAsserted(
         () -> assertThat(getNumberOfCurrentExecutionsInServers(servers))
             .isEqualTo(executionsExpected));
+    // Wait some extra milliseconds to allow for the command to actually start 
to
+    // avoid flakyness in the tests.
+    Thread.sleep(100);

Review comment:
       > @albertogpz a possible way to test this is to confirm that the two 
clusters have the same entries, rather than comparing against a counter that is 
constantly moving
   
   @kohlmu-pivotal I have changed the way to check that the command started 
copying entries by looking at the size of the remote site. If the remote site 
has at least one entry, it means that the command already started.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to