geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [16/23] incubator-geode git commit: GEODE-1421: improve test to provide more info on failure
Date Thu, 16 Jun 2016 17:23:36 GMT
GEODE-1421: improve test to provide more info on failure

I ran the test 1000 times and they all passed.
Assertions are now done on the member that does
the get that should have also stored the entry
in the cache.


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

Branch: refs/heads/feature/GEODE-835
Commit: cdfb9401cff5b86ebcf8fb424bb36139bba36a91
Parents: 0d5de3e
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue Jun 14 16:39:10 2016 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Tue Jun 14 16:41:19 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache/management/MemoryThresholdsDUnitTest.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cdfb9401/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index a91c8f5..baad698 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -1993,6 +1993,8 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase
{
         {
           Integer k = new Integer(4);
           assertEquals(k.toString(), r.get(k, new Integer(expectedInvocations++)));
+          assertFalse(hmm.getState().isCritical());
+          assertTrue(r.containsKey(k));
         }
         
         // Place in a critical state for the next test
@@ -2004,6 +2006,8 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase
{
         {
           Integer k = new Integer(5);
           assertEquals(k.toString(), r.get(k, new Integer(expectedInvocations++)));
+          assertTrue(hmm.getState().isCritical());
+          assertFalse(r.containsKey(k));
         }
 
         newfakeHeapUsage = Math.round(fakeHeapMaxSize * (criticalHeapThresh - 0.3f));  //
below critical by 30%
@@ -2015,6 +2019,8 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase
{
         {
           Integer k = new Integer(6);
           assertEquals(k.toString(), r.get(k, new Integer(expectedInvocations++)));
+          assertFalse(hmm.getState().isCritical());
+          assertTrue(r.containsKey(k));
         }
         return new Integer(expectedInvocations);
       }


Mime
View raw message