This is an automated email from the ASF dual-hosted git repository. udo pushed a commit to branch feature/GEODE-3926_3 in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-3926_3 by this push: new 922b5d6 Amended PartitionedRepositoryManagerJUnitTest.java test 922b5d6 is described below commit 922b5d68d67314c84c58d009e043e41a61101921 Author: Udo Kohlmeyer <ukohlme...@pivotal.io> AuthorDate: Fri Mar 30 10:35:22 2018 -0700 Amended PartitionedRepositoryManagerJUnitTest.java test --- .../internal/PartitionedRepositoryManagerJUnitTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java index 38319b6..17cb061 100644 --- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java +++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java @@ -60,6 +60,7 @@ import org.apache.geode.cache.lucene.internal.partition.BucketTargetingMap; import org.apache.geode.cache.lucene.internal.repository.IndexRepository; import org.apache.geode.cache.lucene.internal.repository.IndexRepositoryImpl; import org.apache.geode.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer; +import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.locks.DLockService; import org.apache.geode.internal.cache.BucketAdvisor; import org.apache.geode.internal.cache.BucketNotFoundException; @@ -105,6 +106,7 @@ public class PartitionedRepositoryManagerJUnitTest { @Before public void setUp() throws IOException { + System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "luceneReindex","true"); cache = Fakes.cache(); userRegion = Mockito.mock(PartitionedRegion.class); userDataStore = Mockito.mock(PartitionedRegionDataStore.class); @@ -247,6 +249,18 @@ public class PartitionedRepositoryManagerJUnitTest { repoManager.getRepositories(ctx); } + @Test(expected = LuceneIndexCreationInProgressException.class) + public void queryByRegionFailingWithInProgressException() + throws LuceneIndexCreationInProgressException, BucketNotFoundException { + setUpMockBucket(0); + setUpMockBucket(1); + + Set<Integer> buckets = new LinkedHashSet<>(Arrays.asList(0, 1)); + InternalRegionFunctionContext ctx = Mockito.mock(InternalRegionFunctionContext.class); + when(ctx.getLocalBucketSet((any()))).thenReturn(buckets); + repoManager.getRepositories(ctx); + } + protected void checkRepositoryContainsBucket(IndexRepositoryImpl repo0, int... bucketIds) { IndexWriter writer0 = repo0.getWriter(); RegionDirectory dir0 = (RegionDirectory) writer0.getDirectory(); -- To stop receiving notification emails like this one, please contact u...@apache.org.