geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject geode git commit: GEODE-2471: fix the race condition in test code.
Date Tue, 14 Feb 2017 19:25:54 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 83141509d -> caafea339


GEODE-2471: fix the race condition in test code.


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

Branch: refs/heads/develop
Commit: caafea339afe52bba3be2dda906860d20a045bc4
Parents: 8314150
Author: zhouxh <gzhou@pivotal.io>
Authored: Tue Feb 14 11:00:04 2017 -0800
Committer: zhouxh <gzhou@pivotal.io>
Committed: Tue Feb 14 11:25:49 2017 -0800

----------------------------------------------------------------------
 .../cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java        | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/caafea33/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index e2e062b..69c2caa 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 import java.util.stream.LongStream;
 
@@ -52,6 +53,7 @@ import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.Wait;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.categories.FlakyTest;
+import org.awaitility.Awaitility;
 
 @Category(DistributedTest.class)
 public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
@@ -1672,7 +1674,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase
{
     assertEquals(expectedKeys, allKeys);
 
     assertTrue(getBucketMoved(vm1, "ln"));
-    assertTrue(getBucketMoved(vm2, "ln"));
+    Awaitility.waitAtMost(10000, TimeUnit.MILLISECONDS).until(() -> getBucketMoved(vm2,
"ln"));
   }
 
   private static Set<Object> getKeysSeen(VM vm, String asyncEventQueueId) {


Mime
View raw message