Skip to content

Commit 206540a

Browse files
authored
EngineTestCase#getDocIds should use internal reader (#49564)
We do not guarantee that EngineTestCase#getDocIds is called after the engine has been externally refreshed. Hence, we trip an assertion assertSearcherIsWarmedUp. CI: https://gradle-enterprise.elastic.co/s/pm2at5qmfm2iu Relates #48605
1 parent 5bc0a3f commit 206540a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/src/main/java/org/elasticsearch/index/engine/EngineTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ public static List<DocIdSeqNoAndSource> getDocIds(Engine engine, boolean refresh
10101010
if (refresh) {
10111011
engine.refresh("test_get_doc_ids");
10121012
}
1013-
try (Engine.Searcher searcher = engine.acquireSearcher("test_get_doc_ids")) {
1013+
try (Engine.Searcher searcher = engine.acquireSearcher("test_get_doc_ids", Engine.SearcherScope.INTERNAL)) {
10141014
List<DocIdSeqNoAndSource> docs = new ArrayList<>();
10151015
for (LeafReaderContext leafContext : searcher.getIndexReader().leaves()) {
10161016
LeafReader reader = leafContext.reader();

0 commit comments

Comments
 (0)