Skip to content

Commit

Permalink
EngineTestCase#getDocIds should use internal reader (#49564)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dnhatn committed Nov 26, 2019
1 parent e9ccaed commit 244fbf2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ public static List<DocIdSeqNoAndSource> getDocIds(Engine engine, boolean refresh
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();
Expand Down

0 comments on commit 244fbf2

Please sign in to comment.