geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject geode git commit: GEODE-2881: Wait for waitForFlushBeforeExecuteTextSearch to complete
Date Mon, 08 May 2017 17:54:03 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 3f1482b68 -> 7030dcdec


GEODE-2881: Wait for waitForFlushBeforeExecuteTextSearch to complete

	* Test now waits for waitForFlushBeforeExecuteTextSearch initiated by the test hook.
	* The test hook gets called when GII is requested.
	* This task may hit CacheClosedException if the test get completed before the flush operations
of GII


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

Branch: refs/heads/develop
Commit: 7030dcdec5be21e2ae3bb1500020e2ec6700a35b
Parents: 3f1482b
Author: nabarun <nnag@pivotal.io>
Authored: Fri May 5 17:13:20 2017 -0700
Committer: nabarun <nnag@pivotal.io>
Committed: Mon May 8 10:50:20 2017 -0700

----------------------------------------------------------------------
 .../cache/lucene/RebalanceWithRedundancyDUnitTest.java  | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/7030dcde/geode-lucene/src/test/java/org/apache/geode/cache/lucene/RebalanceWithRedundancyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/RebalanceWithRedundancyDUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/RebalanceWithRedundancyDUnitTest.java
index f866e51..0cb7b43 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/RebalanceWithRedundancyDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/RebalanceWithRedundancyDUnitTest.java
@@ -31,6 +31,7 @@ import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.internal.cache.InitialImageOperation;
 import org.apache.geode.internal.cache.InitialImageOperation.GIITestHook;
 import org.apache.geode.internal.cache.InitialImageOperation.GIITestHookType;
+import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.test.dunit.SerializableRunnableIF;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
@@ -150,9 +151,20 @@ public class RebalanceWithRedundancyDUnitTest extends LuceneQueriesAccessorBase
           });
     });
 
+
     dataStore2.invoke(() -> initDataStore(createIndex, regionTestType));
 
     assertTrue(waitForFlushBeforeExecuteTextSearch(dataStore1, 30000));
+
+    dataStore2.invoke(() -> {
+      PartitionedRegion region = (PartitionedRegion) getCache().getRegion(REGION_NAME);
+      Awaitility.await().atMost(1, TimeUnit.MINUTES)
+          .until(() -> assertEquals(0, region.getPrStats().getLowRedundancyBucketCount()));
+    });
+
+    dataStore1.invoke(() -> getCache().close());
+
+    assertTrue(waitForFlushBeforeExecuteTextSearch(dataStore2, 30000));
     executeTextSearch(accessor, "world", "text", NUM_BUCKETS);
   }
 


Mime
View raw message