Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

package org.elasticsearch.action.search;

import com.carrotsearch.randomizedtesting.annotations.Repeat;

import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.ScoreMode;
import org.elasticsearch.TransportVersion;
Expand All @@ -29,6 +31,7 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.LongArray;
import org.elasticsearch.common.util.concurrent.AtomicArray;
import org.elasticsearch.core.SuppressForbidden;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.query.RangeQueryBuilder;
Expand All @@ -40,7 +43,6 @@
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.DocValueFormat;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchService;
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.aggregations.AggregationExecutionContext;
Expand Down Expand Up @@ -446,8 +448,9 @@ public void testSearchIdle() throws Exception {
);
}

@SuppressForbidden(reason = "testing")
@Repeat(iterations = 100)
public void testCircuitBreakerReduceFail() throws Exception {
updateClusterSettings(Settings.builder().put(SearchService.BATCHED_QUERY_PHASE.getKey(), false));
int numShards = randomIntBetween(1, 10);
indexSomeDocs("test", numShards, numShards * 3);

Expand Down Expand Up @@ -521,9 +524,7 @@ public void onFailure(Exception exc) {
}
assertBusy(() -> assertThat(requestBreakerUsed(), equalTo(0L)));
} finally {
updateClusterSettings(
Settings.builder().putNull("indices.breaker.request.limit").putNull(SearchService.BATCHED_QUERY_PHASE.getKey())
);
updateClusterSettings(Settings.builder().putNull("indices.breaker.request.limit"));
}
}

Expand Down