Skip to content

Commit e9d476b

Browse files
committed
Fix testStopQueryInlineStats - allow wider range of values
1 parent aef5c27 commit e9d476b

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,6 @@ tests:
510510
- class: org.elasticsearch.repositories.blobstore.testkit.analyze.MinioRepositoryAnalysisRestIT
511511
method: testRepositoryAnalysis
512512
issue: https://github.com/elastic/elasticsearch/issues/134853
513-
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
514-
method: testStopQueryInlinestats
515-
issue: https://github.com/elastic/elasticsearch/issues/134854
516513
- class: org.elasticsearch.xpack.esql.action.CrossClusterCancellationIT
517514
method: testCancelSkipUnavailable
518515
issue: https://github.com/elastic/elasticsearch/issues/134865
@@ -528,9 +525,6 @@ tests:
528525
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
529526
method: test {csv-spec:stats.CountDistinctWithConditions}
530527
issue: https://github.com/elastic/elasticsearch/issues/134993
531-
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
532-
method: testStopQueryInlineStats
533-
issue: https://github.com/elastic/elasticsearch/issues/135032
534528
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
535529
method: test {csv-spec:fork.ForkBeforeStatsWithWhere}
536530
issue: https://github.com/elastic/elasticsearch/issues/135041

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,13 @@ public void testStopQueryInlineStats() throws Exception {
314314
assertThat(asyncResponse.columns().size(), equalTo(2));
315315
AtomicInteger i = new AtomicInteger(0);
316316
asyncResponse.values().forEachRemaining(row -> {
317-
// We will have all rows here but total will be null since we stopped the inline stats before it could complete
318-
assertThat(row.next(), equalTo(null));
319317
var v = row.next();
318+
// The sum could be null, if the stats did not manage to compute anything before being stopped
319+
// Or it could be 45L if it managed to add 0-9
320+
if (v != null) {
321+
assertThat((long) v, equalTo(45L));
322+
}
323+
v = row.next();
320324
if (v != null) {
321325
assertThat((long) v, lessThanOrEqualTo(10L));
322326
}

0 commit comments

Comments
 (0)