Skip to content

Commit d154230

Browse files
ES|QL: fix MultiClustersIT (elastic#131199)
1 parent cbd88cd commit d154230

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,6 @@ tests:
543543
- class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT
544544
method: test
545545
issue: https://github.com/elastic/elasticsearch/issues/131154
546-
- class: org.elasticsearch.xpack.esql.ccq.MultiClustersIT
547-
method: testNotLikeListKeyword
548-
issue: https://github.com/elastic/elasticsearch/issues/131155
549546
- class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDiskSpaceTests
550547
method: testEnqueuedMergeTasksAreUnblockedWhenEstimatedMergeSizeChanges
551548
issue: https://github.com/elastic/elasticsearch/issues/131165

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClustersIT.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,16 @@ public void testNotLikeListKeyword() throws Exception {
629629
""", includeCCSMetadata);
630630
var columns = List.of(Map.of("name", "c", "type", "long"), Map.of("name", "_index", "type", "keyword"));
631631
Predicate<Doc> filter = d -> false == (d.color.contains("blue") || d.color.contains("red"));
632-
var values = List.of(
633-
List.of((int) remoteDocs.stream().filter(filter).count(), REMOTE_CLUSTER_NAME + ":" + remoteIndex),
634-
List.of((int) localDocs.stream().filter(filter).count(), localIndex)
635-
);
632+
633+
var values = new ArrayList<>();
634+
int remoteCount = (int) remoteDocs.stream().filter(filter).count();
635+
int localCount = (int) localDocs.stream().filter(filter).count();
636+
if (remoteCount > 0) {
637+
values.add(List.of(remoteCount, REMOTE_CLUSTER_NAME + ":" + remoteIndex));
638+
}
639+
if (localCount > 0) {
640+
values.add(List.of(localCount, localIndex));
641+
}
636642
assertResultMapForLike(includeCCSMetadata, result, columns, values, false, true);
637643
}
638644

0 commit comments

Comments
 (0)