geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject [03/50] [abbrv] incubator-geode git commit: Added DEBUG logging to diagnose intermittent failure of testEntryTtlLocalDestroy
Date Tue, 10 Nov 2015 23:42:25 GMT
Added DEBUG logging to diagnose intermittent failure of testEntryTtlLocalDestroy


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

Branch: refs/heads/feature/GEODE-12
Commit: e26f3dacfa2501eed874db9625e60d81cf0208d6
Parents: a400154
Author: Darrel Schneider <dschneider@pivotal.io>
Authored: Fri Oct 30 11:13:23 2015 -0700
Committer: Darrel Schneider <dschneider@pivotal.io>
Committed: Fri Oct 30 11:14:07 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e26f3dac/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 50c0cfb..bc0eb7f 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
@@ -4078,6 +4078,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
               while (retry-- > 0) {
                 try {
                   l.assertCount(1, 0, 0, 0);
+                  // TODO: a race exists in which assertCount may also see a destroyCount
of 1
+                  logger.info("DEBUG: saw create");
                   break;
                 } catch (AssertionFailedError e) {
                   if (retry > 0) {
@@ -4096,7 +4098,17 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase
{
               // The previous code would fail after 100ms; now we wait 3000ms.
               WaitCriterion waitForUpdate = new WaitCriterion() {
                 public boolean done() {
-                  return region.getEntry(key) == null;
+                  Region.Entry re = region.getEntry(key);
+                  if (re != null) {
+                    LocalRegion lr = (LocalRegion) region;
+                    EntryExpiryTask eet = lr.getEntryExpiryTask(key);
+                    if (eet != null) {
+                      logger.info("DEBUG: waiting for expire destroy expirationTime= " +
eet.getExpirationTime() + " now=" + eet.getNow() + " currentTimeMillis=" + System.currentTimeMillis());
+                    } else {
+                      logger.info("DEBUG: waiting for expire destroy but expiry task is null");
+                    }
+                  }
+                  return re == null;
                 }
                 public String description() {
                   LocalRegion lr = (LocalRegion) region;
@@ -4104,7 +4116,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
                   try {
                     EntryExpiryTask eet = lr.getEntryExpiryTask(key);
                     if (eet != null) {
-                      expiryInfo = "expirationTime= " + eet.getExpirationTime() + " now="
+ eet.getNow();
+                      expiryInfo = "expirationTime= " + eet.getExpirationTime() + " now="
+ eet.getNow() + " currentTimeMillis=" + System.currentTimeMillis();
                     }
                   } catch (EntryNotFoundException ex) {
                     expiryInfo ="EntryNotFoundException when getting expiry task";


Mime
View raw message