Skip to content

Commit b7f6db3

Browse files
authored
fix testCancellationDuringTimeSeriesAggregation (#119925) (#119932)
(cherry picked from commit 5f9efb5)
1 parent ea4879d commit b7f6db3

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
@@ -401,9 +401,6 @@ tests:
401401
- class: org.elasticsearch.xpack.ml.integration.ForecastIT
402402
method: testOverflowToDisk
403403
issue: https://github.com/elastic/elasticsearch/issues/117740
404-
- class: org.elasticsearch.aggregations.bucket.SearchCancellationIT
405-
method: testCancellationDuringTimeSeriesAggregation
406-
issue: https://github.com/elastic/elasticsearch/issues/118992
407404
- class: org.elasticsearch.versioning.ConcurrentSeqNoVersioningIT
408405
method: testSeqNoCASLinearizability
409406
issue: https://github.com/elastic/elasticsearch/issues/117249

0 commit comments

Comments
 (0)