You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2015/08/14 23:24:22 UTC

incubator-geode git commit: GEODE-220: Use wait after off-heap destroyRegion

Repository: incubator-geode
Updated Branches:
  refs/heads/develop eb7e7b778 -> 8eb6cef8a


GEODE-220: Use wait after off-heap destroyRegion


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

Branch: refs/heads/develop
Commit: 8eb6cef8a3428d77d6e8661fda6b2a9292f7f367
Parents: eb7e7b7
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Fri Aug 14 14:15:35 2015 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Fri Aug 14 14:23:02 2015 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/cache30/MultiVMRegionTestCase.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8eb6cef8/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index ecec932..c5e2821 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -2323,8 +2323,16 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           region.destroyRegion(arg);
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
-            assertEquals(0, ma.getStats().getObjects());
+            final SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            WaitCriterion waitForStatChange = new WaitCriterion() {
+              public boolean done() {
+                return ma.getStats().getObjects() == 0;
+              }
+              public String description() {
+                return "never saw off-heap object count go to zero. Last value was " + ma.getStats().getObjects();
+              }
+            };
+            DistributedTestCase.waitForCriterion(waitForStatChange, 3000, 10, true);
           }
         }
       });