DonalEvans commented on a change in pull request #7422:
URL: https://github.com/apache/geode/pull/7422#discussion_r825150421



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
##########
@@ -2231,6 +2240,102 @@ public void 
testpersistentWanGateway_restartSenderWithCleanQueuesDelayed_expectN
     vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));
   }
 
+
+  /**
+   * Enable persistence for region as well as GatewaySender and see if remote 
site receives all the
+   * events.
+   */
+  @Test
+  public void 
testPersistentPartitionedRegionWithGatewaySenderStartStopEventsDispatchedNoChangesInQueue()
 {
+    Integer lnPort = vm0.invoke(() -> 
WANTestBase.createFirstLocatorWithDSId(1));
+    Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, 
lnPort));
+
+    createCacheInVMs(nyPort, vm2, vm3);
+
+    createCacheInVMs(lnPort, vm4, vm5);
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun(5));
+    vm5.invoke(() -> setNumDispatcherThreadsForTheRun(5));
+
+    vm4.invoke(() -> WANTestBase.createSender("ln", 2, true, 100, 10, false, 
true, null, false));
+    vm5.invoke(() -> WANTestBase.createSender("ln", 2, true, 100, 10, false, 
true, null, false));
+
+    vm4.invoke(() -> 
WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        100, isOffHeap()));
+    vm5.invoke(() -> 
WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), "ln", 1,
+        100, isOffHeap()));
+
+
+    vm2.invoke(() -> 
WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        100, isOffHeap()));
+    vm3.invoke(() -> 
WANTestBase.createPersistentPartitionedRegion(getTestMethodName(), null, 1,
+        100, isOffHeap()));
+
+    vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 1000));
+
+
+    vm4.invoke(() -> WANTestBase.stopSender("ln"));
+    vm5.invoke(() -> WANTestBase.stopSender("ln"));
+
+    logger.info("Stopped all the senders.");
+
+    // wait for senders to stop
+    vm4.invoke(waitForSenderNonRunnable());
+    vm5.invoke(waitForSenderNonRunnable());
+
+    createReceiverInVMs(vm2, vm3);
+
+    AsyncInvocation inv1 = vm4.invokeAsync(startSenderRunnable());
+    AsyncInvocation inv2 = vm5.invokeAsync(startSenderRunnable());
+
+    try {
+      inv1.join();
+      inv2.join();
+    } catch (InterruptedException e) {
+      e.printStackTrace();
+      fail();
+    }

Review comment:
       Why is it important to do so? I'm not an expert on WAN stuff, so there's 
a lot I don't know that might seem obvious.




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