@@ -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