geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [08/50] [abbrv] incubator-geode git commit: GEODE-220: Use wait after off-heap destroyRegion
Date Wed, 09 Sep 2015 23:58:51 GMT
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/feature/GEODE-12
Commit: 8eb6cef8a3428d77d6e8661fda6b2a9292f7f367
Parents: eb7e7b7
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Fri Aug 14 14:15:35 2015 -0700
Committer: Darrel Schneider <dschneider@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);
           }
         }
       });


Mime
View raw message