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/12/02 01:06:15 UTC
[06/13] incubator-geode git commit: added testClose
added testClose
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ae138c1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ae138c1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ae138c1d
Branch: refs/heads/feature/GEODE-607
Commit: ae138c1db24e0b207e58bdef95d2071d7f361719
Parents: 2e83b6c
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Nov 25 15:55:55 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Nov 25 15:55:55 2015 -0800
----------------------------------------------------------------------
.../internal/offheap/SimpleMemoryAllocatorJUnitTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ae138c1d/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
index b09087d..f69c305 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
@@ -164,6 +164,17 @@ public class SimpleMemoryAllocatorJUnitTest {
SimpleMemoryAllocatorImpl.freeOffHeapMemory();
}
}
+ @Test
+ public void testClose() {
+ UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024*1024);
+ try {
+ SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
+ ma.close();
+ } finally {
+ SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+ }
+
+ }
@Test
public void testCompaction() {