**Build scan:**
https://gradle-enterprise.elastic.co/s/n2rdnntuvhw64/tests/:x-pack:plugin:snapshot-based-recoveries:internalClusterTest/org.elasticsearch.xpack.snapshotbasedrecoveries.recovery.SnapshotBasedIndexRecoveryIT/testNodeDisconnectsDoNotOverAccountRecoveredBytes

**Reproduction line:**
`./gradlew ':x-pack:plugin:snapshot-based-recoveries:internalClusterTest' --tests "org.elasticsearch.xpack.snapshotbasedrecoveries.recovery.SnapshotBasedIndexRecoveryIT.testNodeDisconnectsDoNotOverAccountRecoveredBytes" -Dtests.seed=2725E4BEF73A48D3 -Dtests.locale=sr-Latn -Dtests.timezone=Turkey -Druntime.java=17`

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.snapshotbasedrecoveries.recovery.SnapshotBasedIndexRecoveryIT&tests.test=testNodeDisconnectsDoNotOverAccountRecoveredBytes

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([2725E4BEF73A48D3]:0)

```
x-pack/plugin/snapshot-based-recoveries/src/internalClusterTest/java/org/elasticsearch/xpack/snapshotbasedrecoveries/recovery/SnapshotBasedIndexRecoveryIT.java
respondToRecoverSnapshotFile) -> {
                AtomicReference<Transport.Connection> startRecoveryConnection = new AtomicReference<>();
                CountDownLatch reestablishRecoverySent = new CountDownLatch(1);
                targetMockTransportService.addSendBehavior((connection, requestId, action, request, options) -> {
                    if (action.equals(PeerRecoverySourceService.Actions.START_RECOVERY)) {
                        startRecoveryConnection.compareAndExchange(null, connection);
                    } else if (action.equals(PeerRecoverySourceService.Actions.REESTABLISH_RECOVERY)) {
                        reestablishRecoverySent.countDown();
                    }
                    connection.sendRequest(requestId, action, request, options);
                });
                String indexRecoveredFromSnapshot1 = indices.get(0);
                assertAcked(
                    client().admin()
                        .indices()
                        .prepareUpdateSettings(indexRecoveredFromSnapshot1)
                        .setSettings(Settings.builder().put("index.routing.allocation.require._name", targetNode))
                        .get()
                );
                awaitForRecoverSnapshotFileRequestReceived.run();
                startRecoveryConnection.get().close();
                reestablishRecoverySent.await();
                String indexRecoveredFromPeer = indices.get(1);
                assertAcked(
                    client().admin()
                        .indices()
                        .prepareUpdateSettings(indexRecoveredFromPeer)
                        .setSettings(Settings.builder().put("index.routing.allocation.require._name", targetNode))
                        .get()
                );