The error message:

```
java.nio.file.AccessDeniedException: C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002\node_s2\shared_snapshot_cache
```

makes this appear related to https://github.com/elastic/elasticsearch/issues/97626

**Build scan:**
https://gradle-enterprise.elastic.co/s/mvpzkmjvxthjw/tests/:x-pack:plugin:searchable-snapshots:internalClusterTest/org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests

**Reproduction line:**
```
null
```

**Applicable branches:**
main

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests&tests.test=classMethod

**Failure excerpt:**
```
java.io.IOException: Could not remove the following files (in the order of attempts):
   C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002\node_s2\shared_snapshot_cache: java.nio.file.AccessDeniedException: C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002\node_s2\shared_snapshot_cache
   C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002\node_s2: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002\node_s2
   C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001\tempDir-002
   C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001: java.nio.file.DirectoryNotEmptyException: C:\Users\jenkins\workspace\platform-support\967\x-pack\plugin\searchable-snapshots\build\testrun\internalClusterTest\temp\org.elasticsearch.xpack.searchablesnapshots.cache.shared.NodesCachesStatsIntegTests_66A855EB9B2E60DD-001

  at __randomizedtesting.SeedInfo.seed([66A855EB9B2E60DD]:0)
  at org.apache.lucene.util.IOUtils.rm(IOUtils.java:341)
  at org.apache.lucene.tests.util.TestRuleTemporaryFilesCleanup.afterAlways(TestRuleTemporaryFilesCleanup.java:209)
  at com.carrotsearch.randomizedtesting.rules.TestRuleAdapter$1.afterAlways(TestRuleAdapter.java:31)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1623)

```
x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/BaseFrozenSearchableSnapshotsIntegTestCase.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */
package org.elasticsearch.xpack.searchablesnapshots;
import org.elasticsearch.blobcache.shared.SharedBlobCacheService;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.RatioValue;
public abstract class BaseFrozenSearchableSnapshotsIntegTestCase extends BaseSearchableSnapshotsIntegTestCase {