geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject [geode] branch develop updated: GEODE-5131: Fixing testParallelPropagationSenderResume test (#1890)
Date Wed, 02 May 2018 15:37:55 GMT
This is an automated email from the ASF dual-hosted git repository.

jasonhuynh pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0d00432  GEODE-5131: Fixing testParallelPropagationSenderResume test (#1890)
0d00432 is described below

commit 0d00432564d6e8ce17e6ab49dd38477a2ca5c52e
Author: Jason Huynh <huynhja@gmail.com>
AuthorDate: Wed May 2 08:37:50 2018 -0700

    GEODE-5131: Fixing testParallelPropagationSenderResume test (#1890)
    
    * Joining async thread before doing any validation
---
 .../test/java/org/apache/geode/internal/cache/wan/WANTestBase.java | 4 ----
 .../wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java     | 7 +++++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
index 357a29c..63dfc61 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
@@ -3242,10 +3242,6 @@ public class WANTestBase extends DistributedTestCase {
           break;
         }
       }
-      RegionQueue regionQueue =
-          ((AbstractGatewaySender) sender).getQueues().toArray(new RegionQueue[1])[0];
-      Set<BucketRegion> buckets = ((PartitionedRegion) regionQueue.getRegion()).getDataStore()
-          .getAllLocalPrimaryBucketRegions();
       final AbstractGatewaySender abstractSender = (AbstractGatewaySender) sender;
       RegionQueue queue = abstractSender.getEventProcessor().queue;
       Awaitility.await().atMost(60, TimeUnit.SECONDS).until(() -> {
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index c6b570f..a17ce7e 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -21,6 +21,7 @@ import static org.apache.geode.test.dunit.IgnoredException.addIgnoredException;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.util.ArrayList;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.Before;
 import org.junit.Rule;
@@ -180,8 +181,9 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     // make sure all the senders are running before doing any puts
     waitForSendersRunning();
 
+    int numPuts = 1000;
     // now, the senders are started. So, start the puts
-    vm4.invokeAsync(() -> doPuts(getTestMethodName() + "_PR", 1000));
+    AsyncInvocation async = vm4.invokeAsync(() -> doPuts(getTestMethodName() + "_PR",
numPuts));
 
     // now, pause all of the senders
     vm4.invoke(() -> pauseSender("ln"));
@@ -195,10 +197,11 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     vm6.invoke(() -> resumeSender("ln"));
     vm7.invoke(() -> resumeSender("ln"));
 
+    async.await(2, TimeUnit.MINUTES);
     validateParallelSenderQueueAllBucketsDrained();
 
     // find the region size on remote vm
-    vm2.invoke(() -> validateRegionSize(getTestMethodName() + "_PR", 1000));
+    vm2.invoke(() -> validateRegionSize(getTestMethodName() + "_PR", numPuts));
   }
 
   /**

-- 
To stop receiving notification emails like this one, please contact
jasonhuynh@apache.org.

Mime
View raw message