You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2015/12/21 19:04:55 UTC

[27/50] [abbrv] incubator-geode git commit: GEODE-568: wait at most 5 seconds before checking the size of the internal region to allow eviction to complete

GEODE-568: wait at most 5 seconds before checking the size of the internal region to allow eviction to complete


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

Branch: refs/heads/feature/GEODE-14
Commit: d58588a44a536c12adf0c5dcb64beda06b18e1f3
Parents: ec9d16a
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Mon Dec 14 15:14:15 2015 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Mon Dec 14 15:14:15 2015 -0800

----------------------------------------------------------------------
 .../gemfire/management/CacheManagementDUnitTest.java     | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d58588a4/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 19fa5d6..b9762a4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -23,6 +23,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.TimeUnit;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.JMException;
@@ -44,6 +46,8 @@ import com.gemstone.gemfire.management.internal.ManagementConstants;
 import com.gemstone.gemfire.management.internal.SystemManagementService;
 import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubListener;
 
+import static com.jayway.awaitility.Awaitility.*;
+import static org.hamcrest.Matchers.*;
 import dunit.AsyncInvocation;
 import dunit.DistributedTestCase;
 import dunit.SerializableRunnable;
@@ -938,10 +942,9 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
         // Even though we got 15 notification only 10 should be there due to
         // eviction attributes set in notification region
 
-        assertEquals(10, member1NotifRegion.size());
-        assertEquals(10, member2NotifRegion.size());
-        assertEquals(10, member3NotifRegion.size());
-
+        waitAtMost(5, TimeUnit.SECONDS).untilCall(to(member1NotifRegion).size(), equalTo(10));
+        waitAtMost(5, TimeUnit.SECONDS).untilCall(to(member2NotifRegion).size(), equalTo(10));
+        waitAtMost(5, TimeUnit.SECONDS).untilCall(to(member3NotifRegion).size(), equalTo(10));
       }
     });