Skip to content

Commit 71892fc

Browse files
committed
Remove double check
1 parent dc5a3c1 commit 71892fc

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,21 @@ private static boolean checkVersion(org.elasticsearch.Version version) {
157157
}
158158

159159
public void testIndicesDontExistWithRemoteLookupJoin() throws IOException {
160-
assumeTrue("Only works with remote LOOKUP JOIN support", Clusters.localClusterVersion().onOrAfter(Version.fromString("9.2.0")));
160+
assumeTrue("Only works with remote LOOKUP JOIN support", EsqlCapabilities.Cap.ENABLE_LOOKUP_JOIN_ON_REMOTE.isEnabled());
161161

162162
int docsTest1 = randomIntBetween(1, 5);
163163
indexTimestampData(docsTest1, "test1", "2024-11-26", "id1");
164164

165-
if (EsqlCapabilities.Cap.ENABLE_LOOKUP_JOIN_ON_REMOTE.isEnabled()) {
166-
var pattern = "FROM test1,*:test1";
167-
ResponseException e = expectThrows(
168-
ResponseException.class,
169-
() -> runEsql(timestampFilter("gte", "2020-01-01").query(pattern + " | LOOKUP JOIN foo ON id1"))
170-
);
171-
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
172-
assertThat(
173-
e.getMessage(),
174-
allOf(containsString("verification_exception"), containsString("Unknown index [foo,remote_cluster:foo]"))
175-
);
176-
}
165+
var pattern = "FROM test1,*:test1";
166+
ResponseException e = expectThrows(
167+
ResponseException.class,
168+
() -> runEsql(timestampFilter("gte", "2020-01-01").query(pattern + " | LOOKUP JOIN foo ON id1"))
169+
);
170+
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
171+
assertThat(
172+
e.getMessage(),
173+
allOf(containsString("verification_exception"), containsString("Unknown index [foo,remote_cluster:foo]"))
174+
);
177175
}
178176

179177
// We need a separate test since remote missing indices and local missing indices now work differently

0 commit comments

Comments
 (0)