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
This commit is contained in:
parent
416178c7c8
commit
d2e92a1791
|
@ -1011,7 +1011,7 @@ public abstract class EngineTestCase extends ESTestCase {
|
|||
if (refresh) {
|
||||
engine.refresh("test_get_doc_ids");
|
||||
}
|
||||
try (Engine.Searcher searcher = engine.acquireSearcher("test_get_doc_ids")) {
|
||||
try (Engine.Searcher searcher = engine.acquireSearcher("test_get_doc_ids", Engine.SearcherScope.INTERNAL)) {
|
||||
List<DocIdSeqNoAndSource> docs = new ArrayList<>();
|
||||
for (LeafReaderContext leafContext : searcher.getIndexReader().leaves()) {
|
||||
LeafReader reader = leafContext.reader();
|
||||
|
|
Loading…
Reference in New Issue