Skip to content

Add more logging in attempt to figure out what's messing up this test #130516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 3, 2025
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 @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public void testStopQueryLocal() throws Exception {
Tuple<Boolean, Boolean> 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",
Expand All @@ -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
Expand All @@ -159,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)) {
Expand Down