Skip to content

Commit 44e559a

Browse files
committed
oops merge dropped this change, restore
1 parent a8e3efb commit 44e559a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.elasticsearch.cluster.RemoteException;
1313
import org.elasticsearch.common.Strings;
1414
import org.elasticsearch.common.settings.Settings;
15+
import org.elasticsearch.index.IndexNotFoundException;
1516
import org.elasticsearch.index.query.QueryBuilder;
1617
import org.elasticsearch.index.query.RangeQueryBuilder;
1718
import org.elasticsearch.test.transport.MockTransportService;
@@ -276,13 +277,13 @@ public void testFilterWithMissingIndex() {
276277
);
277278
assertThat(e.getDetailedMessage(), containsString("Unknown index [missing]"));
278279
// Local index missing + wildcards
279-
// FIXME: planner does not catch this now
280-
// e = expectThrows(VerificationException.class, () -> runQuery("from missing,logs*", randomBoolean(), filter).close());
281-
// assertThat(e.getDetailedMessage(), containsString("Unknown index [missing]"));
280+
// FIXME: planner does not catch this now, it should be VerificationException but for now it's runtime IndexNotFoundException
281+
var ie = expectThrows(IndexNotFoundException.class, () -> runQuery("from missing,logs*", randomBoolean(), filter).close());
282+
assertThat(ie.getDetailedMessage(), containsString("no such index [missing]"));
282283
// Local index missing + existing index
283-
// FIXME: planner does not catch this now
284-
// e = expectThrows(VerificationException.class, () -> runQuery("from missing,logs-1", randomBoolean(), filter).close());
285-
// assertThat(e.getDetailedMessage(), containsString("Unknown index [missing]"));
284+
// FIXME: planner does not catch this now, it should be VerificationException but for now it's runtime IndexNotFoundException
285+
ie = expectThrows(IndexNotFoundException.class, () -> runQuery("from missing,logs-1", randomBoolean(), filter).close());
286+
assertThat(ie.getDetailedMessage(), containsString("no such index [missing]"));
286287
// Local index missing + existing remote
287288
e = expectThrows(VerificationException.class, () -> runQuery("from missing,cluster-a:logs-2", randomBoolean(), filter).close());
288289
assertThat(e.getDetailedMessage(), containsString("Unknown index [missing]"));

0 commit comments

Comments
 (0)