DATAGEODE-210 - Add assertion to assert that the LuceneIndex is flushed properly after data is put into the Region.

This commit is contained in:
John Blum
2019-07-17 21:41:51 -07:00
parent e83c25f27d
commit a2093fc0e0

View File

@@ -182,8 +182,16 @@ public class LuceneOperationsIntegrationTests {
LuceneService luceneService =
event.getApplicationContext().getBean("luceneService", LuceneService.class);
SpringUtils.safeRunOperation(() ->
luceneService.waitUntilFlushed("PersonTitleIndex", "/People", 15L, TimeUnit.SECONDS));
boolean flushed = SpringUtils.safeGetValue(() -> {
try {
return luceneService.waitUntilFlushed("PersonTitleIndex", "/People", 15L, TimeUnit.SECONDS);
}
catch (Throwable ignore) {
return false;
}
});
assertThat(flushed).describedAs("LuceneIndex not flushed!").isTrue();
}
}