Skip to content

Commit 4700e42

Browse files
committed
This test should work as is
1 parent fcf476c commit 4700e42

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RequestIndexFilteringTestCase.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,26 +198,17 @@ public void testIndicesDontExist() throws IOException {
198198
int docsTest1 = 0; // we are interested only in the created index, not necessarily that it has data
199199
indexTimestampData(docsTest1, "test1", "2024-11-26", "id1");
200200

201-
ResponseException e = expectThrows(
202-
ResponseException.class,
203-
() -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo")).allowPartialResults(false))
204-
);
201+
ResponseException e = expectThrows(ResponseException.class, () -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo"))));
205202
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
206203
assertThat(e.getMessage(), containsString("verification_exception"));
207204
assertThat(e.getMessage(), anyOf(containsString("Unknown index [foo]"), containsString("Unknown index [remote_cluster:foo]")));
208205

209-
e = expectThrows(
210-
ResponseException.class,
211-
() -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo*")).allowPartialResults(false))
212-
);
206+
e = expectThrows(ResponseException.class, () -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo*"))));
213207
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
214208
assertThat(e.getMessage(), containsString("verification_exception"));
215209
assertThat(e.getMessage(), anyOf(containsString("Unknown index [foo*]"), containsString("Unknown index [remote_cluster:foo*]")));
216210

217-
e = expectThrows(
218-
ResponseException.class,
219-
() -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo", "test1")).allowPartialResults(false))
220-
);
211+
e = expectThrows(ResponseException.class, () -> runEsql(timestampFilter("gte", "2020-01-01").query(from("foo", "test1"))));
221212
assertEquals(404, e.getResponse().getStatusLine().getStatusCode());
222213
assertThat(e.getMessage(), containsString("index_not_found_exception"));
223214
assertThat(e.getMessage(), anyOf(containsString("no such index [foo]"), containsString("no such index [remote_cluster:foo]")));
@@ -226,7 +217,7 @@ public void testIndicesDontExist() throws IOException {
226217
var pattern = from("test1");
227218
e = expectThrows(
228219
ResponseException.class,
229-
() -> runEsql(timestampFilter("gte", "2020-01-01").query(pattern + " | LOOKUP JOIN foo ON id1").allowPartialResults(false))
220+
() -> runEsql(timestampFilter("gte", "2020-01-01").query(pattern + " | LOOKUP JOIN foo ON id1"))
230221
);
231222
assertEquals(400, e.getResponse().getStatusLine().getStatusCode());
232223
assertThat(

0 commit comments

Comments
 (0)