**Build scan:**
https://gradle-enterprise.elastic.co/s/5q2ukbpqbhz7i/tests/:x-pack:plugin:snapshot-repo-test-kit:internalClusterTest/org.elasticsearch.repositories.blobstore.testkit.RepositoryAnalysisSuccessIT/testRepositoryAnalysis

**Reproduction line:**
```
./gradlew ':x-pack:plugin:snapshot-repo-test-kit:internalClusterTest' --tests "org.elasticsearch.repositories.blobstore.testkit.RepositoryAnalysisSuccessIT.testRepositoryAnalysis" -Dtests.seed=BE53761FA83A5950 -Dtests.locale=ca -Dtests.timezone=America/Port-au-Prince -Druntime.java=20
```

**Applicable branches:**
main

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.repositories.blobstore.testkit.RepositoryAnalysisSuccessIT&tests.test=testRepositoryAnalysis

**Failure excerpt:**
```
org.elasticsearch.repositories.RepositoryVerificationException: [test-repo] analysis failed, you may need to manually remove [temp-analysis-0Fi4UgK2T72QJxKdRInE2Q]

  at __randomizedtesting.SeedInfo.seed([BE53761FA83A5950:476ED77176A16AB9]:0)

  Caused by: org.elasticsearch.repositories.RepositoryVerificationException: [test-repo] register [test-register-EZnfK-0gTm-NSGWxRGkMzw] should have value [3] but instead had value [OptionalLong.empty]


```
x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/RepositoryAnalysisSuccessIT.java
private final String pathPrefix;
        @Nullable 
        private String currentPath;
        @Nullable 
        private AssertingBlobContainer currentBlobContainer;
        private Semaphore writeSemaphore = new Semaphore(new RepositoryAnalyzeAction.Request("dummy").getConcurrency());
        private int maxBlobCount = new RepositoryAnalyzeAction.Request("dummy").getBlobCount();
        private long maxBlobSize = new RepositoryAnalyzeAction.Request("dummy").getMaxBlobSize().getBytes();
        private long maxTotalBlobSize = new RepositoryAnalyzeAction.Request("dummy").getMaxTotalDataSize().getBytes();
        AssertingBlobStore(@Nullable String basePath) {
            this.pathPrefix = basePath == null ? "" : basePath + "/";
        }
        @Override
        public BlobContainer blobContainer(BlobPath path) {
            assertThat(path.buildAsString(), startsWith(pathPrefix + "temp-analysis-"));
            synchronized (this) {
                if (currentPath == null) {
                    currentPath = path.buildAsString();
                    currentBlobContainer = new AssertingBlobContainer(
                        path,
                        this::deleteContainer,
                        writeSemaphore,
                        maxBlobCount,
                        maxBlobSize,
                        maxTotalBlobSize
                    );
                }