From 16414f412c088e52dfa537c4cdc44cd2d645cbee Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Wed, 2 Jul 2025 19:19:13 -0600 Subject: [PATCH 1/2] Add more logging in attempt to figure out what's messing up this test --- muted-tests.yml | 3 --- .../xpack/esql/action/CrossClusterAsyncQueryStopIT.java | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 7597692b6095b..a1e93275c47c3 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -224,9 +224,6 @@ tests: - class: org.elasticsearch.packaging.test.BootstrapCheckTests method: test20RunWithBootstrapChecks issue: https://github.com/elastic/elasticsearch/issues/124940 -- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT - method: testStopQueryLocal - issue: https://github.com/elastic/elasticsearch/issues/121672 - class: org.elasticsearch.packaging.test.BootstrapCheckTests method: test10Install issue: https://github.com/elastic/elasticsearch/issues/124957 diff --git a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java index 37e6b0bb48404..57090590a4991 100644 --- a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java +++ b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java @@ -133,6 +133,7 @@ public void testStopQueryLocal() throws Exception { Tuple includeCCSMetadata = randomIncludeCCSMetadata(); boolean responseExpectMeta = includeCCSMetadata.v2(); + LOGGER.info("Launching async query"); final String asyncExecutionId = startAsyncQuery( client(), "FROM blocking,*:logs-* | STATS total=sum(coalesce(const,v)) | LIMIT 1", @@ -141,11 +142,15 @@ public void testStopQueryLocal() throws Exception { try { // wait until we know that the local query against 'blocking' has started + LOGGER.info("Waiting for {} to start", asyncExecutionId); assertTrue(SimplePauseFieldPlugin.startEmitting.await(30, TimeUnit.SECONDS)); // wait until the remotes are done + LOGGER.info("Waiting for remotes", asyncExecutionId); waitForCluster(client(), REMOTE_CLUSTER_1, asyncExecutionId); + LOGGER.info("Remote 1 done", asyncExecutionId); waitForCluster(client(), REMOTE_CLUSTER_2, asyncExecutionId); + LOGGER.info("Remote 2 done", asyncExecutionId); /* at this point: * the query against remotes should be finished From d234ccc68cca434afc0d0458a565dd5c555663fb Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Thu, 3 Jul 2025 10:17:43 -0600 Subject: [PATCH 2/2] Add --> --- .../esql/action/CrossClusterAsyncQueryStopIT.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java index 57090590a4991..222ffb5c05b0d 100644 --- a/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java +++ b/x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncQueryStopIT.java @@ -133,7 +133,7 @@ public void testStopQueryLocal() throws Exception { Tuple includeCCSMetadata = randomIncludeCCSMetadata(); boolean responseExpectMeta = includeCCSMetadata.v2(); - LOGGER.info("Launching async query"); + LOGGER.info("--> Launching async query"); final String asyncExecutionId = startAsyncQuery( client(), "FROM blocking,*:logs-* | STATS total=sum(coalesce(const,v)) | LIMIT 1", @@ -142,15 +142,15 @@ public void testStopQueryLocal() throws Exception { try { // wait until we know that the local query against 'blocking' has started - LOGGER.info("Waiting for {} to start", asyncExecutionId); + LOGGER.info("--> Waiting for {} to start", asyncExecutionId); assertTrue(SimplePauseFieldPlugin.startEmitting.await(30, TimeUnit.SECONDS)); // wait until the remotes are done - LOGGER.info("Waiting for remotes", asyncExecutionId); + LOGGER.info("--> Waiting for remotes", asyncExecutionId); waitForCluster(client(), REMOTE_CLUSTER_1, asyncExecutionId); - LOGGER.info("Remote 1 done", asyncExecutionId); + LOGGER.info("--> Remote 1 done", asyncExecutionId); waitForCluster(client(), REMOTE_CLUSTER_2, asyncExecutionId); - LOGGER.info("Remote 2 done", asyncExecutionId); + LOGGER.info("--> Remote 2 done", asyncExecutionId); /* at this point: * the query against remotes should be finished @@ -164,14 +164,14 @@ public void testStopQueryLocal() throws Exception { assertBusy(() -> { try (EsqlQueryResponse asyncResponse = getAsyncResponse(client(), asyncExecutionId)) { EsqlExecutionInfo executionInfo = asyncResponse.getExecutionInfo(); - LOGGER.info("Waiting for stop operation to start, current status: {}", executionInfo); + LOGGER.info("--> Waiting for stop operation to start, current status: {}", executionInfo); assertNotNull(executionInfo); assertThat(executionInfo.isStopped(), is(true)); } }); // allow local query to proceed SimplePauseFieldPlugin.allowEmitting.countDown(); - LOGGER.info("Collecting results for {}", asyncExecutionId); + LOGGER.info("--> Collecting results for {}", asyncExecutionId); // Since part of the query has not been stopped, we expect some result to emerge here try (EsqlQueryResponse asyncResponse = stopAction.actionGet(30, TimeUnit.SECONDS)) {