geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [06/13] incubator-geode git commit: added testClose
Date Wed, 02 Dec 2015 00:06:15 GMT
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 <dschneider@pivotal.io>
Authored: Wed Nov 25 15:55:55 2015 -0800
Committer: Darrel Schneider <dschneider@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() {


Mime
View raw message