### CI Link

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

### Repro line

./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.indices.recovery.IndexRecoveryIT.testTransientErrorsDuringRecoveryAreRetried" -Dtests.seed=4BDFC31A406EBDF9 -Dtests.locale=ga -Dtests.timezone=America/Atikokan -Druntime.java=19	

### Does it reproduce?

Didn't try

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?search.timeZoneId=Europe/Rome&tests.container=org.elasticsearch.indices.recovery.IndexRecoveryIT&tests.test=testTransientErrorsDuringRecoveryAreRetried

### Failure excerpt

```
java.lang.AssertionError: timed out waiting for green state
```

Call to `ensureGreen()` times out before being able to reach a stable cluster state.
server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java
String nodeA = internalCluster().startNode();
        logger.info("--> create repository");
        createRepository(randomBoolean());
        ensureGreen();
        logger.info("--> create index on node: {}", nodeA);
        createAndPopulateIndex(INDEX_NAME, 1, SHARD_COUNT, REPLICA_COUNT);
        logger.info("--> snapshot");
        CreateSnapshotResponse createSnapshotResponse = createSnapshot(INDEX_NAME);
        client().admin().indices().prepareClose(INDEX_NAME).execute().actionGet();
        logger.info("--> restore");
        RestoreSnapshotResponse restoreSnapshotResponse = client().admin()
            .cluster()
            .prepareRestoreSnapshot(REPO_NAME, SNAP_NAME)
            .setWaitForCompletion(true)
            .execute()
            .actionGet();
        int totalShards = restoreSnapshotResponse.getRestoreInfo().totalShards();
        assertThat(totalShards, greaterThan(0));
        ensureGreen();
        logger.info("--> request recoveries");
        RecoveryResponse response = client().admin().indices().prepareRecoveries(INDEX_NAME).execute().actionGet();
        Repository repository = internalCluster().getAnyMasterNodeInstance(RepositoriesService.class).repository(REPO_NAME);
        final RepositoryData repositoryData = PlainActionFuture.get(repository::getRepositoryData);
        for (Map.Entry<String, List<RecoveryState>> indexRecoveryStates : response.shardRecoveryStates().entrySet()) {
            assertThat(indexRecoveryStates.getKey(), equalTo(INDEX_NAME));
            List<RecoveryState> recoveryStates = indexRecoveryStates.getValue();
            assertThat(recoveryStates.size(), equalTo(totalShards));
            for (RecoveryState recoveryState : recoveryStates) {
                SnapshotRecoverySource recoverySource = new SnapshotRecoverySource(
                    ((SnapshotRecoverySource) recoveryState.getRecoverySource()).restoreUUID(),