Fix testCacheWithFilteredAlias failure (#39401)
Move refresh after Forcemerge Relates to #32827
This commit is contained in:
parent
2619f48e4d
commit
4ca514f18c
|
@ -386,10 +386,10 @@ public class IndicesRequestCacheIT extends ESIntegTestCase {
|
||||||
ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);
|
ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);
|
||||||
client.prepareIndex("index", "type", "1").setRouting("1").setSource("created_at",
|
client.prepareIndex("index", "type", "1").setRouting("1").setSource("created_at",
|
||||||
DateTimeFormatter.ISO_LOCAL_DATE.format(now)).get();
|
DateTimeFormatter.ISO_LOCAL_DATE.format(now)).get();
|
||||||
refresh();
|
|
||||||
// Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache
|
// Force merge the index to ensure there can be no background merges during the subsequent searches that would invalidate the cache
|
||||||
ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get();
|
ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get();
|
||||||
ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse);
|
ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse);
|
||||||
|
refresh();
|
||||||
|
|
||||||
assertCacheState(client, "index", 0, 0);
|
assertCacheState(client, "index", 0, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue