Skip to content

Commit 231656b

Browse files
authored
Allow the test to also accept partial, this seems to be normal (#132614) (#132949)
(cherry picked from commit 71ae0cc) # Conflicts: # muted-tests.yml
1 parent 1a4ed9e commit 231656b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import static org.hamcrest.Matchers.is;
4949
import static org.hamcrest.Matchers.lessThanOrEqualTo;
5050
import static org.hamcrest.Matchers.not;
51+
import static org.hamcrest.Matchers.oneOf;
5152

5253
public class CrossClusterQueryWithPartialResultsIT extends AbstractCrossClusterTestCase {
5354

@@ -295,7 +296,11 @@ public void testFailToStartRequestOnRemoteCluster() throws Exception {
295296
assertThat(returnedIds, equalTo(local.okIds));
296297
assertClusterSuccess(resp, LOCAL_CLUSTER, local.okShards);
297298
EsqlExecutionInfo.Cluster remoteInfo = resp.getExecutionInfo().getCluster(REMOTE_CLUSTER_1);
298-
assertThat(remoteInfo.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.SKIPPED));
299+
// It could also return partial on failure
300+
assertThat(
301+
remoteInfo.getStatus(),
302+
oneOf(EsqlExecutionInfo.Cluster.Status.SKIPPED, EsqlExecutionInfo.Cluster.Status.PARTIAL)
303+
);
299304
assertClusterFailure(resp, REMOTE_CLUSTER_1, simulatedFailure.getMessage());
300305
}
301306
} finally {

0 commit comments

Comments
 (0)