geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [1/4] incubator-geode git commit: fixed testTestHookStatistics
Date Thu, 04 Aug 2016 21:58:25 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1714 48ce52aa2 -> 19db65842


fixed testTestHookStatistics


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

Branch: refs/heads/feature/GEODE-1714
Commit: 22c780582df3d2a68b325be6f66d92c35a990308
Parents: 48ce52a
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Thu Aug 4 10:19:51 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Thu Aug 4 10:19:51 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache30/DiskRegionDUnitTest.java    | 31 ++++++++++++--------
 1 file changed, 19 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22c78058/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
index a43950e..e89e16d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionDUnitTest.java
@@ -1160,33 +1160,40 @@ public class DiskRegionDUnitTest extends JUnit4CacheTestCase {
     assertEquals(total - 1, diskStats.getNumEntriesInVM());
     assertEquals(5, diskStats.getNumOverflowOnDisk());
 
-    // Make sure invalidate doesn't change anything
+    // Make sure invalidate of inVM entry changes inVM count but not disk
     region.invalidate(new Integer(total+10));
-    assertEquals(region.entryCount(), diskStats.getNumEntriesInVM() +
+    assertEquals(region.entryCount()-1, diskStats.getNumEntriesInVM() +
                  diskStats.getNumOverflowOnDisk());
-    assertEquals(total - 1, diskStats.getNumEntriesInVM());
+    assertEquals(total - 2, diskStats.getNumEntriesInVM());
     assertEquals(5, diskStats.getNumOverflowOnDisk());
 
-    // Make sure local-invalidate doesn't change anything
+    // Make sure local-invalidate of inVM entry changes inVM count but not disk
     region.localInvalidate(new Integer(total+11));
-    assertEquals(region.entryCount(), diskStats.getNumEntriesInVM() +
+    assertEquals(region.entryCount()-2, diskStats.getNumEntriesInVM() +
                  diskStats.getNumOverflowOnDisk());
-    assertEquals(total - 1, diskStats.getNumEntriesInVM());
+    assertEquals(total - 3, diskStats.getNumEntriesInVM());
     assertEquals(5, diskStats.getNumOverflowOnDisk());
 
-    // Make sure destroy does
+    // Make sure destroy of invalid entry does not change inVM or onDisk but changes entry
count
     region.destroy(new Integer(total+10));
-    ((LocalRegion)region).dumpBackingMap();
-    assertEquals(region.entryCount(), diskStats.getNumEntriesInVM() +
+    //((LocalRegion)region).dumpBackingMap();
+    assertEquals(region.entryCount()-1, diskStats.getNumEntriesInVM() +
                  diskStats.getNumOverflowOnDisk());
-    assertEquals(total - 2, diskStats.getNumEntriesInVM());
+    assertEquals(total - 3, diskStats.getNumEntriesInVM());
+    assertEquals(5, diskStats.getNumOverflowOnDisk());
+
+    // Make sure destroy of inVM entry does change inVM but not onDisk
+    region.destroy(new Integer(total+12));
+    assertEquals(region.entryCount()-1, diskStats.getNumEntriesInVM() +
+                 diskStats.getNumOverflowOnDisk());
+    assertEquals(total - 4, diskStats.getNumEntriesInVM());
     assertEquals(5, diskStats.getNumOverflowOnDisk());
 
     // Destroy an entry that has been overflowed
     region.destroy(new Integer(3));
-    assertEquals(region.entryCount(), diskStats.getNumEntriesInVM() +
+    assertEquals(region.entryCount()-1, diskStats.getNumEntriesInVM() +
                  diskStats.getNumOverflowOnDisk());
-    assertEquals(total - 2, diskStats.getNumEntriesInVM());
+    assertEquals(total - 4, diskStats.getNumEntriesInVM());
     assertEquals(4, diskStats.getNumOverflowOnDisk());
   }
 


Mime
View raw message