|
7 | 7 |
|
8 | 8 | package org.elasticsearch.xpack.esql.action; |
9 | 9 |
|
10 | | -import org.elasticsearch.Build; |
11 | 10 | import org.elasticsearch.action.ActionFuture; |
12 | 11 | import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; |
13 | 12 | import org.elasticsearch.action.admin.cluster.node.tasks.cancel.TransportCancelTasksAction; |
@@ -287,44 +286,4 @@ public void testCancelSkipUnavailable() throws Exception { |
287 | 286 | Exception error = expectThrows(Exception.class, requestFuture::actionGet); |
288 | 287 | assertThat(error, instanceOf(TaskCancelledException.class)); |
289 | 288 | } |
290 | | - |
291 | | - // Check that closing remote node with skip_unavailable=true produces partial |
292 | | - public void testCloseSkipUnavailable() throws Exception { |
293 | | - // We are using delay() here because closing cluster while inside pause fields doesn't seem to produce clean closure |
294 | | - assumeTrue("Only snapshot builds have delay()", Build.current().isSnapshot()); |
295 | | - createRemoteIndex(between(1000, 5000)); |
296 | | - createLocalIndex(10); |
297 | | - EsqlQueryRequest request = EsqlQueryRequest.syncEsqlQueryRequest(); |
298 | | - request.query(""" |
299 | | - FROM test*,cluster-a:test* METADATA _index |
300 | | - | EVAL cluster=MV_FIRST(SPLIT(_index, ":")) |
301 | | - | WHERE CASE(cluster == "cluster-a", delay(1ms), true) |
302 | | - | STATS total = sum(const) | LIMIT 1 |
303 | | - """); |
304 | | - request.pragmas(randomPragmas()); |
305 | | - var requestFuture = client().execute(EsqlQueryAction.INSTANCE, request); |
306 | | - assertTrue(SimplePauseFieldPlugin.startEmitting.await(30, TimeUnit.SECONDS)); |
307 | | - SimplePauseFieldPlugin.allowEmitting.countDown(); |
308 | | - cluster(REMOTE_CLUSTER).close(); |
309 | | - try (var resp = requestFuture.actionGet()) { |
310 | | - EsqlExecutionInfo executionInfo = resp.getExecutionInfo(); |
311 | | - assertNotNull(executionInfo); |
312 | | - assertThat(executionInfo.isPartial(), equalTo(true)); |
313 | | - |
314 | | - List<List<Object>> values = getValuesList(resp); |
315 | | - assertThat(values.get(0).size(), equalTo(1)); |
316 | | - // We can't be sure of the exact value here as we don't know if any data from remote came in, but all local data should be there |
317 | | - assertThat((long) values.get(0).get(0), greaterThanOrEqualTo(10L)); |
318 | | - |
319 | | - EsqlExecutionInfo.Cluster cluster = executionInfo.getCluster(REMOTE_CLUSTER); |
320 | | - EsqlExecutionInfo.Cluster localCluster = executionInfo.getCluster(LOCAL_CLUSTER); |
321 | | - |
322 | | - assertThat(localCluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.SUCCESSFUL)); |
323 | | - assertThat(localCluster.getSuccessfulShards(), equalTo(1)); |
324 | | - |
325 | | - assertThat(cluster.getStatus(), equalTo(EsqlExecutionInfo.Cluster.Status.PARTIAL)); |
326 | | - assertThat(cluster.getSuccessfulShards(), equalTo(0)); |
327 | | - assertThat(cluster.getFailures().size(), equalTo(1)); |
328 | | - } |
329 | | - } |
330 | 289 | } |
0 commit comments