Skip to content

Commit

Permalink
Fix testCacheWithFilteredAlias failure (#39401)
Browse files Browse the repository at this point in the history
Move refresh after Forcemerge

Relates to #32827
  • Loading branch information
mayya-sharipova committed Feb 26, 2019
1 parent 2619f48 commit 4ca514f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ public void testCacheWithFilteredAlias() {
ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);
client.prepareIndex("index", "type", "1").setRouting("1").setSource("created_at",
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
ForceMergeResponse forceMergeResponse = client.admin().indices().prepareForceMerge("index").setFlush(true).get();
ElasticsearchAssertions.assertAllSuccessful(forceMergeResponse);
refresh();

assertCacheState(client, "index", 0, 0);

Expand Down

0 comments on commit 4ca514f

Please sign in to comment.