You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2015/12/22 20:26:33 UTC

[31/35] incubator-geode git commit: GEODE-299

GEODE-299

when shutdown distributed system, Wait until cache is closed.


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

Branch: refs/heads/feature/GEODE-217
Commit: adacdd72ed96b4fdaa8d4d78b924e2648b66865f
Parents: 26ce9a4
Author: zhouxh <gz...@pivotal.io>
Authored: Mon Dec 21 11:45:17 2015 -0800
Committer: zhouxh <gz...@pivotal.io>
Committed: Mon Dec 21 11:49:58 2015 -0800

----------------------------------------------------------------------
 .../partitioned/PersistentPartitionedRegionDUnitTest.java      | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/adacdd72/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
index 39ffb11..d043df8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache.partitioned;
 
+import static com.jayway.awaitility.Awaitility.await;
+import static java.util.concurrent.TimeUnit.SECONDS;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.File;
@@ -1439,7 +1441,11 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
           public void beforeSendMessage(DistributionManager dm,
               DistributionMessage msg) {
             if(msg instanceof ManageBucketReplyMessage) {
+              Cache cache = getCache();
               DistributedTestCase.disconnectFromDS();
+              
+              await().atMost(30, SECONDS).until(() -> {return (cache == null || cache.isClosed());});
+              getLogWriter().info("Cache is confirmed closed");
             }
           }
         });