Skip to content

Commit

Permalink
Don't verify evictions in testFilterCacheStats (#42091)
Browse files Browse the repository at this point in the history
If a background merge and refresh happens after a search but before a
stats query, then evictions will be non-zero.

Closes #32506
  • Loading branch information
dnhatn committed May 15, 2019
1 parent 66d555b commit 606a173
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import org.elasticsearch.test.ESIntegTestCase.Scope;
import org.elasticsearch.test.InternalSettingsPlugin;
import org.elasticsearch.test.junit.annotations.TestLogging;

import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -1008,8 +1007,6 @@ private void assertCumulativeQueryCacheStats(IndicesStatsResponse response) {
assertEquals(total, shardTotal);
}

@TestLogging("_root:DEBUG") // this fails at a very low rate on CI: https://github.com/elastic/elasticsearch/issues/32506
@AwaitsFix( bugUrl = "https://github.com/elastic/elasticsearch/issues/32506")
public void testFilterCacheStats() throws Exception {
Settings settings = Settings.builder().put(indexSettings()).put("number_of_replicas", 0).build();
assertAcked(prepareCreate("index").setSettings(settings).get());
Expand All @@ -1034,7 +1031,6 @@ public void testFilterCacheStats() throws Exception {
IndicesStatsResponse stats = client().admin().indices().prepareStats("index").setQueryCache(true).get();
assertCumulativeQueryCacheStats(stats);
assertThat(stats.getTotal().queryCache.getHitCount(), equalTo(0L));
assertThat(stats.getTotal().queryCache.getEvictions(), equalTo(0L));
assertThat(stats.getTotal().queryCache.getMissCount(), greaterThan(0L));
assertThat(stats.getTotal().queryCache.getCacheSize(), greaterThan(0L));
});
Expand All @@ -1045,7 +1041,6 @@ public void testFilterCacheStats() throws Exception {
IndicesStatsResponse stats = client().admin().indices().prepareStats("index").setQueryCache(true).get();
assertCumulativeQueryCacheStats(stats);
assertThat(stats.getTotal().queryCache.getHitCount(), greaterThan(0L));
assertThat(stats.getTotal().queryCache.getEvictions(), equalTo(0L));
assertThat(stats.getTotal().queryCache.getMissCount(), greaterThan(0L));
assertThat(stats.getTotal().queryCache.getCacheSize(), greaterThan(0L));
});
Expand Down

0 comments on commit 606a173

Please sign in to comment.