geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [2/9] geode git commit: GEODE-1672: Added recovery wait for all the regions created to address race condition in the test.
Date Mon, 06 Feb 2017 17:59:17 GMT
GEODE-1672: Added recovery wait for all the regions created to
            address race condition in the test.


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

Branch: refs/heads/feature/GEODE-1930-2
Commit: 086df14b0dce92c5dd0678f36879533d310d9a37
Parents: 3a12d61
Author: Anil <agingade@pivotal.io>
Authored: Fri Feb 3 12:06:07 2017 -0800
Committer: Anil <agingade@pivotal.io>
Committed: Fri Feb 3 12:06:07 2017 -0800

----------------------------------------------------------------------
 .../geode/internal/cache/DiskLruRegRecoveryJUnitTest.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/086df14b/geode-core/src/test/java/org/apache/geode/internal/cache/DiskLruRegRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/DiskLruRegRecoveryJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/DiskLruRegRecoveryJUnitTest.java
index bf5a71a..b91d294 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/DiskLruRegRecoveryJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/DiskLruRegRecoveryJUnitTest.java
@@ -64,6 +64,7 @@ public class DiskLruRegRecoveryJUnitTest extends DiskRegionTestingBase {
 
     DiskRegionProperties diskProps = new DiskRegionProperties();
     Region nonLruRegion = null;
+    int numRegions = 1;
 
     diskProps.setDiskDirs(dirs);
     diskProps.setPersistBackup(true);
@@ -78,6 +79,7 @@ public class DiskLruRegRecoveryJUnitTest extends DiskRegionTestingBase {
     }
 
     if (addNonLruRegion) {
+      numRegions++;
       nonLruRegion = createNonLruRegion();
     }
 
@@ -98,7 +100,8 @@ public class DiskLruRegRecoveryJUnitTest extends DiskRegionTestingBase
{
       }
     }
 
-    final CountDownLatch recoveryDone = new CountDownLatch(1);
+    // Regions are created with its own disk store.
+    final CountDownLatch recoveryDone = new CountDownLatch(numRegions);
     DiskStoreObserver.setInstance(new DiskStoreObserver() {
       @Override
       public void afterAsyncValueRecovery(DiskStoreImpl store) {


Mime
View raw message