**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
assertThat(source.get("field"), is(equalTo(docIdToMatch)));
                    assertThat(source.get("field2"), is(equalTo("Some text " + docIdToMatch)));
                }
                case 2 -> {
                    searchResponse = searchRequestBuilder.setQuery(QueryBuilders.matchQuery("field2", "text")).get();
                    assertSearchResponseContainsAllIndexedDocs(searchResponse, docCount);
                }
                default -> throw new IllegalStateException("Unexpected value: " + testCase);
            }
        }
    }
    private void assertSearchResponseContainsAllIndexedDocs(SearchResponse searchResponse, long docCount) {
        assertThat(searchResponse.getSuccessfulShards(), equalTo(1));
        assertThat(searchResponse.getHits().getTotalHits().value, equalTo(docCount));
        for (int i = 0; i < searchResponse.getHits().getHits().length; i++) {
            SearchHit searchHit = searchResponse.getHits().getAt(i);
            Map<String, Object> source = searchHit.getSourceAsMap();
            assertThat(source, is(notNullValue()));
            assertThat(source.get("field"), is(equalTo(i)));
            assertThat(source.get("field2"), is(equalTo("Some text " + i)));
        }
    }
    private void assertPeerRecoveryWasSuccessful(RecoveryState recoveryState, String sourceNode, String targetNode) {
        assertThat(recoveryState.getStage(), equalTo(RecoveryState.Stage.DONE));
        assertThat(recoveryState.getRecoverySource(), equalTo(RecoverySource.PeerRecoverySource.INSTANCE));
        assertThat(recoveryState.getSourceNode(), notNullValue());
        assertThat(recoveryState.getSourceNode().getName(), equalTo(sourceNode));
        assertThat(recoveryState.getTargetNode(), notNullValue());
        assertThat(recoveryState.getTargetNode().getName(), equalTo(targetNode));
        RecoveryState.Index indexState = recoveryState.getIndex();