geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [02/50] [abbrv] incubator-geode git commit: GEODE-1413: Replaced wait with awaitility clause on receiver regionSize
Date Tue, 31 May 2016 21:25:32 GMT
GEODE-1413: Replaced wait with awaitility clause on receiver regionSize

* Replaced the wait for 2 seconds with awaitility clause which waits for the receiver region
size to become the expected size.

This closes #146


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bd892f53
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bd892f53
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bd892f53

Branch: refs/heads/feature/GEODE-93
Commit: bd892f531aaaeb14361df1a71fb7341f04034749
Parents: b558567
Author: nabarun <nnag@pivotal.io>
Authored: Tue May 24 11:01:19 2016 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Tue May 24 16:10:21 2016 -0700

----------------------------------------------------------------------
 .../ParallelGatewaySenderOperationsDUnitTest.java        | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd892f53/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 77661fe..5e00c77 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.parallel;
 
+import java.util.concurrent.TimeUnit;
+
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.GemFireIOException;
@@ -30,6 +32,7 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.RMIException;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.jayway.awaitility.Awaitility;
 
 /**
  * DUnit test for operations on ParallelGatewaySender
@@ -328,7 +331,8 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     stopSenders();
     
     LogWriterUtils.getLogWriter().info("All the senders are stopped");
-    Wait.pause(2000);
+    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 200,
120000));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 200,
120000));
     
     //SECOND RUN: do some of the puts after the senders are stopped
     vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR", 1000 ));
@@ -348,8 +352,9 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     LogWriterUtils.getLogWriter().info("All the senders are started");
     
     async.join();
-        
-    Wait.pause(2000);
+
+    vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 5000,
120000));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + "_PR", 5000,
120000));
     
     //verify all the buckets on all the sender nodes are drained
     validateParallelSenderQueueAllBucketsDrained();


Mime
View raw message