### CI Link

https://gradle-enterprise.elastic.co/s/sa7kgcpbjsuyo

### Repro line

./gradlew ':x-pack:plugin:esql:internalClusterTest' --tests "org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.testCancelRead" -Dtests.seed=A10FD59C7183AD95 -Dbuild.snapshot=false -Dtests.jvm.argline="-Dbuild.snapshot=false" -Dtests.locale=ga-IE -Dtests.timezone=Europe/Stockholm -Druntime.java=20

### Does it reproduce?

No

### Applicable branches

main

### Failure history

_No response_

### Failure excerpt

```
org.elasticsearch.xpack.esql.action.EsqlActionTaskIT > testCancelRead FAILED
    java.lang.AssertionError: 
    Expected: a collection with size <2>
         but: collection size was <0>
        at __randomizedtesting.SeedInfo.seed([A10FD59C7183AD95:34226718C99014F4]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.lambda$getTasksStarting$2(EsqlActionTaskIT.java:229)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1196)
        at org.elasticsearch.test.ESTestCase.assertBusy(ESTestCase.java:1169)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.getTasksStarting(EsqlActionTaskIT.java:221)
        at org.elasticsearch.xpack.esql.action.EsqlActionTaskIT.testCancelRead(EsqlActionTaskIT.java:167)
```
x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionTaskIT.java
.setDetailed(true)
                .get()
                .getTasks();
            assertThat(tasks, hasSize(equalTo(2)));
            for (TaskInfo task : tasks) {
                assertThat(task.action(), equalTo(DriverTaskRunner.ACTION_NAME));
                DriverStatus status = (DriverStatus) task.status();
                assertThat(task.description(), either(equalTo(READ_DESCRIPTION)).or(equalTo(MERGE_DESCRIPTION)));
                if (task.description().equals(READ_DESCRIPTION)) {
                    assertThat(status.status(), equalTo(DriverStatus.Status.RUNNING));
                } else {
                    assertThat(status.status(), equalTo(DriverStatus.Status.ASYNC));
                }
            }
            foundTasks.addAll(tasks);
        });
        return foundTasks;
    }
    private void assertCancelled(ActionFuture<EsqlQueryResponse> response) throws Exception {
        Exception e = expectThrows(Exception.class, response::actionGet);
        Throwable cancelException = ExceptionsHelper.unwrap(e, TaskCancelledException.class);
        assertNotNull(cancelException);
        /*
         * Either the task was cancelled by out request and has "test cancel"
         * or the cancellation chained from another cancellation and has
         * "task cancelled".
         */
        assertThat(cancelException.getMessage(), either(equalTo("test cancel")).or(equalTo("task cancelled")));
        assertBusy(
            () -> assertThat(