geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject incubator-geode git commit: GEODE-450: fix race in unit test
Date Tue, 20 Oct 2015 21:34:05 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-409 f8935b3b8 -> a23c33c71


GEODE-450: fix race in unit test

The test now waits 30 seconds instead of 3.
Also when it fails it will print info about when it
thought the entry that is not expiring is scheduled to expire.


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

Branch: refs/heads/feature/GEODE-409
Commit: a23c33c71228f3104abb81d73fad8bf031600657
Parents: f8935b3
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Tue Oct 20 14:33:07 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Tue Oct 20 14:33:07 2015 -0700

----------------------------------------------------------------------
 .../gemfire/cache30/MultiVMRegionTestCase.java        | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a23c33c7/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 b6ba865..e9a8e29 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
@@ -4090,10 +4090,20 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase
{
                   return region.getEntry(key) == null;
                 }
                 public String description() {
-                  return "Entry for key " + key + " never expired (since it still exists)";
+                  LocalRegion lr = (LocalRegion) region;
+                  String expiryInfo = "";
+                  try {
+                    EntryExpiryTask eet = lr.getEntryExpiryTask(key);
+                    if (eet != null) {
+                      expiryInfo = "expirationTime= " + eet.getExpirationTime() + " now="
+ eet.getNow();
+                    }
+                  } catch (EntryNotFoundException ex) {
+                    expiryInfo ="EntryNotFoundException when getting expiry task";
+                  }
+                  return "Entry for key " + key + " never expired (since it still exists)
" + expiryInfo;
                 }
               };
-              DistributedTestCase.waitForCriterion(waitForUpdate, 3000, 1, true);
+              DistributedTestCase.waitForCriterion(waitForUpdate, 30000, 1, true);
             }
             assertNull(region.getEntry(key));
           }


Mime
View raw message