use of org.apache.geode.test.dunit.SerializableRunnableIF in project geode by apache.
the class LuceneIndexCreationDUnitTest method verifyMemberWithoutIndexCreatedFirstFails.
@Test
@Parameters({ "PARTITION" })
public void verifyMemberWithoutIndexCreatedFirstFails(RegionTestableType regionType) {
SerializableRunnableIF createIndex1 = () -> {
/* Do nothing */
};
dataStore1.invoke(() -> initDataStore(createIndex1, regionType));
SerializableRunnableIF createIndex2 = getFieldsIndexWithOneField();
dataStore2.invoke(() -> initDataStore(createIndex2, regionType, CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_INDEXES_3));
}
use of org.apache.geode.test.dunit.SerializableRunnableIF in project geode by apache.
the class LuceneIndexCreationDUnitTest method verifyDifferentFieldAnalyzersFails1.
@Test
@Parameters({ "PARTITION" })
public void verifyDifferentFieldAnalyzersFails1(RegionTestableType regionType) {
SerializableRunnableIF createIndex1 = getAnalyzersIndexWithOneField(StandardAnalyzer.class);
dataStore1.invoke(() -> initDataStore(createIndex1, regionType));
SerializableRunnableIF createIndex2 = getAnalyzersIndexWithOneField(KeywordAnalyzer.class);
dataStore2.invoke(() -> initDataStore(createIndex2, regionType, CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS_2));
}
use of org.apache.geode.test.dunit.SerializableRunnableIF in project geode by apache.
the class LuceneIndexCreationDUnitTest method verifyNullIsReturnedWhenGetIndexIsCalledWithNoMatchingIndex.
@Test
public void verifyNullIsReturnedWhenGetIndexIsCalledWithNoMatchingIndex() {
SerializableRunnableIF createIndex = get2FieldsIndexes();
dataStore1.invoke(() -> createIndex);
dataStore2.invoke(() -> createIndex);
dataStore1.invoke(() -> {
LuceneService luceneService = LuceneServiceProvider.get(getCache());
assertNull(luceneService.getIndex(INDEX_NAME + "_A", REGION_NAME));
});
dataStore2.invoke(() -> {
LuceneService luceneService = LuceneServiceProvider.get(getCache());
assertNull(luceneService.getIndex(INDEX_NAME + "_A", REGION_NAME));
});
}
use of org.apache.geode.test.dunit.SerializableRunnableIF in project geode by apache.
the class LuceneIndexCreationDUnitTest method verifyThatIndexObjectIsRetrievedWhenPresentInTheSystem.
@Test
@Parameters(method = "parametersForMultipleIndexCreates")
public void verifyThatIndexObjectIsRetrievedWhenPresentInTheSystem(int numberOfIndexes, RegionTestableType regionType) {
SerializableRunnableIF createIndex = getMultipleIndexes(numberOfIndexes);
dataStore1.invoke(() -> initDataStore(createIndex, regionType));
dataStore1.invoke(() -> verifyIndexes(numberOfIndexes));
dataStore2.invoke(() -> initDataStore(createIndex, regionType));
dataStore2.invoke(() -> verifyIndexes(numberOfIndexes));
}
use of org.apache.geode.test.dunit.SerializableRunnableIF in project geode by apache.
the class LuceneIndexCreationDUnitTest method verifyDifferentFieldAnalyzersFails2.
@Test
@Parameters({ "PARTITION" })
public void verifyDifferentFieldAnalyzersFails2(RegionTestableType regionType) {
SerializableRunnableIF createIndex1 = getAnalyzersIndexWithNullField1();
dataStore1.invoke(() -> initDataStore(createIndex1, regionType));
SerializableRunnableIF createIndex2 = getAnalyzersIndexWithNullField2();
dataStore2.invoke(() -> initDataStore(createIndex2, regionType, CANNOT_CREATE_LUCENE_INDEX_DIFFERENT_ANALYZERS));
}
Aggregations