Fix intermittent failure in InternalEngineTest#testRefreshScopedSearcher
This change switches the merge policy to none (for this specific test) in order to make sure that refreshes are always triggered
by a change in the writer.
Closes
@@ -4112,6 +4112,11 @@ public class InternalEngineTests extends EngineTestCase {
}
public void testRefreshScopedSearcher() throws IOException {
+ try (Store store = createStore();
+ InternalEngine engine =
+ // disable merges to make sure that the reader doesn't change unexpectedly during the test
+ createEngine(defaultSettings, store, createTempDir(), NoMergePolicy.INSTANCE)) {
+
try (Searcher getSearcher = engine.acquireSearcher("test", Engine.SearcherScope.INTERNAL);
Searcher searchSearcher = engine.acquireSearcher("test", Engine.SearcherScope.EXTERNAL)) {
assertSameReader(getSearcher, searchSearcher);
@@ -4170,6 +4175,7 @@ public class InternalEngineTests extends EngineTestCase {
}
}
}
+ }
public void testSeqNoGenerator() throws IOException {
engine.close();
