Skip to content

Commit 5f9efb5

Browse files
authored
fix testCancellationDuringTimeSeriesAggregation (#119925)
1 parent 79713f5 commit 5f9efb5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/aggregations/src/internalClusterTest/java/org/elasticsearch/aggregations/bucket/SearchCancellationIT.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.elasticsearch.action.support.WriteRequest;
2020
import org.elasticsearch.aggregations.AggregationsPlugin;
2121
import org.elasticsearch.aggregations.bucket.timeseries.TimeSeriesAggregationBuilder;
22+
import org.elasticsearch.client.internal.Client;
2223
import org.elasticsearch.cluster.metadata.IndexMetadata;
2324
import org.elasticsearch.index.IndexMode;
2425
import org.elasticsearch.index.IndexSettings;
@@ -97,9 +98,11 @@ public void testCancellationDuringTimeSeriesAggregation() throws Exception {
9798

9899
logger.info("Executing search");
99100
// we have to explicitly set error_trace=true for the later exception check for `TimeSeriesIndexSearcher`
100-
client().threadPool().getThreadContext().putHeader("error_trace", "true");
101+
Client client = client();
102+
client.threadPool().getThreadContext().putHeader("error_trace", "true");
101103
TimeSeriesAggregationBuilder timeSeriesAggregationBuilder = new TimeSeriesAggregationBuilder("test_agg");
102-
ActionFuture<SearchResponse> searchResponse = prepareSearch("test").setQuery(matchAllQuery())
104+
ActionFuture<SearchResponse> searchResponse = client.prepareSearch("test")
105+
.setQuery(matchAllQuery())
103106
.addAggregation(
104107
timeSeriesAggregationBuilder.subAggregation(
105108
new ScriptedMetricAggregationBuilder("sub_agg").initScript(

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ tests:
202202
- class: org.elasticsearch.cluster.service.MasterServiceTests
203203
method: testThreadContext
204204
issue: https://github.com/elastic/elasticsearch/issues/118914
205-
- class: org.elasticsearch.aggregations.bucket.SearchCancellationIT
206-
method: testCancellationDuringTimeSeriesAggregation
207-
issue: https://github.com/elastic/elasticsearch/issues/118992
208205
- class: org.elasticsearch.xpack.security.authc.AuthenticationServiceTests
209206
method: testInvalidToken
210207
issue: https://github.com/elastic/elasticsearch/issues/119019

0 commit comments

Comments
 (0)