Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,6 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.InferenceIT
method: testInferClassificationModel
issue: https://github.com/elastic/elasticsearch/issues/133448
- class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT
method: testPartialResults
issue: https://github.com/elastic/elasticsearch/issues/131481
- class: org.elasticsearch.xpack.ml.integration.ClassificationIT
method: testWithCustomFeatureProcessors
issue: https://github.com/elastic/elasticsearch/issues/134001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,20 @@ private void assertClusterSuccess(EsqlQueryResponse resp, String clusterAlias, i

public void testPartialResults() throws Exception {
populateIndices();
EsqlQueryRequest request = new EsqlQueryRequest();
request.query("FROM ok*,fail*,*:ok*,*:fail* | KEEP id, fail_me | LIMIT 1000");
request.includeCCSMetadata(randomBoolean());
{
EsqlQueryRequest request = new EsqlQueryRequest();
request.query("FROM ok*,fail*,*:ok*,*:fail* | KEEP id, fail_me | LIMIT 1000");
request.includeCCSMetadata(randomBoolean());
request.allowPartialResults(false);
Exception error = expectThrows(Exception.class, () -> runQuery(request).close());
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);

assertThat(error, instanceOf(IllegalStateException.class));
assertThat(error.getMessage(), containsString("Accessing failing field"));
}
EsqlQueryRequest request = new EsqlQueryRequest();
request.query("FROM ok*,fail*,*:ok*,*:fail* | KEEP id, fail_me | LIMIT 1000");
request.includeCCSMetadata(randomBoolean());
request.allowPartialResults(true);
try (var resp = runQuery(request)) {
assertTrue(resp.isPartial());
Expand All @@ -134,6 +137,8 @@ public void testPartialResults() throws Exception {
for (String cluster : List.of(LOCAL_CLUSTER, REMOTE_CLUSTER_1, REMOTE_CLUSTER_2)) {
assertClusterFailure(resp, cluster, "Accessing failing field");
}
} catch (Exception e) {
throw new AssertionError("failed to execute query", e);
}
}

Expand Down