Use accurate total hits in IndexPrimaryRelocationIT
By default, we track total hits up to 10k but we might index more than 10k documents `testPrimaryRelocationWhileIndexing`. With this change, we always request for the accurate total hits in the test. > java.lang.AssertionError: Count is 10000+ hits but 11684 was expected.
This commit is contained in:
parent
46ccfba808
commit
40348ab726
|
@ -100,8 +100,8 @@ public class IndexPrimaryRelocationIT extends ESIntegTestCase {
|
|||
finished.set(true);
|
||||
indexingThread.join();
|
||||
refresh("test");
|
||||
ElasticsearchAssertions.assertHitCount(client().prepareSearch("test").get(), numAutoGenDocs.get());
|
||||
ElasticsearchAssertions.assertHitCount(client().prepareSearch("test")// extra paranoia ;)
|
||||
ElasticsearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true).get(), numAutoGenDocs.get());
|
||||
ElasticsearchAssertions.assertHitCount(client().prepareSearch("test").setTrackTotalHits(true)// extra paranoia ;)
|
||||
.setQuery(QueryBuilders.termQuery("auto", true)).get(), numAutoGenDocs.get());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue