There's a windows AccessDeniedException buried in here somewhere but I'm not sure if that's the root cause or not.

**Build scan:**
https://gradle-enterprise.elastic.co/s/ua7fjthhwhydq/tests/:server:internalClusterTest/org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT/testDeleteIndexDuringSnapshot

**Reproduction line:**
`gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT.testDeleteIndexDuringSnapshot" -Dtests.seed=205E4FD38CD27088 -Dtests.locale=bg-BG -Dtests.timezone=Africa/Kinshasa -Druntime.java=18`

**Applicable branches:**
master

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT&tests.test=testDeleteIndexDuringSnapshot

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

  at __randomizedtesting.SeedInfo.seed([205E4FD38CD27088]:0)

```
server/src/internalClusterTest/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreIT.java
logger.info("--> make sure that properly setup repository can be registered on all nodes");
        clusterAdmin().preparePutRepository("test-repo-0")
            .setType("fs")
            .setSettings(Settings.builder().put("location", randomRepoPath()))
            .get();
    }
    public void testThatSensitiveRepositorySettingsAreNotExposed() throws Exception {
        disableRepoConsistencyCheck("This test does not create any data in the repository");
        logger.info("--> start two nodes");
        internalCluster().startNodes(2);
        createRepository(
            "test-repo",
            "mock",
            Settings.builder()
                .put("location", randomRepoPath())
                .put(MockRepository.Plugin.USERNAME_SETTING.getKey(), "notsecretusername")
                .put(MockRepository.Plugin.PASSWORD_SETTING.getKey(), "verysecretpassword")
        );
        NodeClient nodeClient = internalCluster().getInstance(NodeClient.class);
        RestGetRepositoriesAction getRepoAction = new RestGetRepositoriesAction(internalCluster().getInstance(SettingsFilter.class));
        RestRequest getRepoRequest = new FakeRestRequest();
        getRepoRequest.params().put("repository", "test-repo");
        final CountDownLatch getRepoLatch = new CountDownLatch(1);
        final AtomicReference<AssertionError> getRepoError = new AtomicReference<>();
        getRepoAction.handleRequest(getRepoRequest, new AbstractRestChannel(getRepoRequest, true) {
            @Override
            public void sendResponse(RestResponse response) {
                try {
                    assertThat(response.content().utf8ToString(), containsString("notsecretusername"));
                    assertThat(response.content().utf8ToString(), not(containsString("verysecretpassword")));