File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/test/java/org/elasticsearch/indices/state Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4141import static java .util .Collections .emptySet ;
4242import static java .util .stream .Collectors .toList ;
4343import static org .elasticsearch .action .support .IndicesOptions .lenientExpandOpen ;
44+ import static org .elasticsearch .search .internal .SearchContext .TRACK_TOTAL_HITS_ACCURATE ;
4445import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
4546import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertHitCount ;
4647import static org .hamcrest .Matchers .containsString ;
@@ -188,7 +189,7 @@ public void testCloseWhileIndexingDocuments() throws Exception {
188189
189190 assertIndexIsClosed (indexName );
190191 assertAcked (client ().admin ().indices ().prepareOpen (indexName ));
191- assertHitCount (client ().prepareSearch (indexName ).setSize (0 ).setTrackTotalHitsUpTo (MAX_DOCS ).get (), nbDocs );
192+ assertHitCount (client ().prepareSearch (indexName ).setSize (0 ).setTrackTotalHitsUpTo (TRACK_TOTAL_HITS_ACCURATE ).get (), nbDocs );
192193 }
193194
194195 public void testCloseWhileDeletingIndices () throws Exception {
@@ -301,7 +302,7 @@ public void testConcurrentClosesAndOpens() throws Exception {
301302 }
302303 refresh (indexName );
303304 assertIndexIsOpened (indexName );
304- assertHitCount (client ().prepareSearch (indexName ).setSize (0 ).setTrackTotalHitsUpTo (MAX_DOCS ).get (),
305+ assertHitCount (client ().prepareSearch (indexName ).setSize (0 ).setTrackTotalHitsUpTo (TRACK_TOTAL_HITS_ACCURATE ).get (),
305306 indexer .totalIndexedDocs ());
306307 }
307308
You can’t perform that action at this time.
0 commit comments