jvarenina commented on a change in pull request #6036:
URL: https://github.com/apache/geode/pull/6036#discussion_r696394197



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -158,10 +158,18 @@ public void 
testPartitionedRegionWithPersistentGatewaySender() {
 
     LogWriterUtils.getLogWriter().info("Started the senders");
 
-    vm2.invoke(
-        () -> WANTestBase.createPartitionedRegion(getTestMethodName(), null, 
1, 100, isOffHeap()));
-    vm3.invoke(
-        () -> WANTestBase.createPartitionedRegion(getTestMethodName(), null, 
1, 100, isOffHeap()));
+    AsyncInvocation inv1 = vm2.invokeAsync(() -> WANTestBase
+        .createPersistentPartitionedRegion(getTestMethodName(), null, 1, 100, 
isOffHeap()));
+    AsyncInvocation inv2 = vm3.invokeAsync(() -> WANTestBase
+        .createPersistentPartitionedRegion(getTestMethodName(), null, 1, 100, 
isOffHeap()));
+    try {
+      inv1.join();
+      inv2.join();
+
+    } catch (InterruptedException e) {
+      e.printStackTrace();
+      fail();
+    }

Review comment:
       Hi @kirklund ,
   
   Thanks for the feedback. What you suggested is much better. As you and Gomez 
suggested, I will remove asynchronous region creation from this case, but I 
will still apply your advice on some other places where I used AsyncInvocation 
in a same way.




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