Skip to content

Commit f6e2092

Browse files
authored
ESQL: Create unique lookup data to avoid matching multiple lookup docs (#133467)
1 parent aa359fd commit f6e2092

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,6 @@ tests:
354354
- class: org.elasticsearch.search.SearchWithRejectionsIT
355355
method: testOpenContextsAfterRejections
356356
issue: https://github.com/elastic/elasticsearch/issues/130821
357-
- class: org.elasticsearch.xpack.esql.ccq.MultiClustersIT
358-
method: testLookupJoinAliases
359-
issue: https://github.com/elastic/elasticsearch/issues/131166
360357
- class: org.elasticsearch.packaging.test.DockerTests
361358
method: test090SecurityCliPackaging
362359
issue: https://github.com/elastic/elasticsearch/issues/131107
@@ -408,9 +405,6 @@ tests:
408405
- class: org.elasticsearch.compute.lucene.read.SortedSetOrdinalsBuilderTests
409406
method: testReader
410407
issue: https://github.com/elastic/elasticsearch/issues/131573
411-
- class: org.elasticsearch.xpack.esql.ccq.MultiClustersIT
412-
method: testLookupJoinAliasesSkipOld
413-
issue: https://github.com/elastic/elasticsearch/issues/131697
414408
- class: org.elasticsearch.packaging.test.DockerTests
415409
method: test151MachineDependentHeapWithSizeOverride
416410
issue: https://github.com/elastic/elasticsearch/issues/123437

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,13 @@ private void setupLookupIndices() throws IOException {
127127
"morecolor": { "type": "keyword" }
128128
}
129129
""";
130-
var lookupDocs = IntStream.range(0, between(1, 5))
131-
.mapToObj(n -> new Doc(n, randomFrom("red", "yellow", "green"), randomIntBetween(1, 1000)))
132-
.toList();
130+
var randomDocsData = new ArrayList<Integer>();
131+
var lookupDocs = IntStream.range(0, between(1, 5)).mapToObj(n -> {
132+
String color = randomFrom("red", "yellow", "green");
133+
int data = randomValueOtherThanMany(i -> randomDocsData.contains(i), () -> randomIntBetween(1, 1000));
134+
randomDocsData.add(data);
135+
return new Doc(n, color, data);
136+
}).toList();
133137
createIndex(
134138
localClient,
135139
lookupIndexLocal,

0 commit comments

Comments
 (0)