Some more earlier failures with the same issue (all in Windows builds):
https://gradle-enterprise.elastic.co/s/ic3vf76vlpiho
https://gradle-enterprise.elastic.co/s/7nsuvadgg5bbm
https://gradle-enterprise.elastic.co/s/7kcrezoswrgdg

**Build scan:**
https://gradle-enterprise.elastic.co/s/whgmtqrtovpgu/tests/:server:internalClusterTest/org.elasticsearch.reservedstate.service.FileSettingsServiceIT/testErrorSaved

**Reproduction line:**
`gradlew ':server:internalClusterTest' --tests "org.elasticsearch.reservedstate.service.FileSettingsServiceIT.testErrorSaved" -Dtests.seed=762F971779043BEB -Dtests.locale=es-BO -Dtests.timezone=Africa/Luanda -Druntime.java=18`

**Applicable branches:**
main

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

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.reservedstate.service.FileSettingsServiceIT&tests.test=testErrorSaved

**Failure excerpt:**
```
org.elasticsearch.cluster.metadata.ProcessClusterEventTimeoutException: failed to process cluster event (delete_repository [*]) within 30s

  at __randomizedtesting.SeedInfo.seed([762F971779043BEB:C5DE1806AEE40E21]:0)
  at org.elasticsearch.cluster.service.MasterService$Batcher.lambda$onTimeout$1(MasterService.java:165)
  at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:825)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  at java.lang.Thread.run(Thread.java:833)

```
server/src/test/java/org/elasticsearch/cluster/metadata/ToAndFromJsonMetadataTests.java
public void testSimpleJsonFromAndTo() throws IOException {
        IndexMetadata idx1 = createFirstBackingIndex("data-stream1").build();
        IndexMetadata idx2 = createFirstBackingIndex("data-stream2").build();
        ReservedStateHandlerMetadata hmOne = new ReservedStateHandlerMetadata("one", Set.of("a", "b"));
        ReservedStateHandlerMetadata hmTwo = new ReservedStateHandlerMetadata("two", Set.of("c", "d"));
        ReservedStateErrorMetadata emOne = new ReservedStateErrorMetadata(
            1L,
            ReservedStateErrorMetadata.ErrorKind.VALIDATION,
            List.of("Test error 1", "Test error 2")
        );
        ReservedStateMetadata reservedStateMetadata = ReservedStateMetadata.builder("namespace_one")
            .errorMetadata(emOne)
            .putHandler(hmOne)
            .putHandler(hmTwo)
            .build();
        ReservedStateMetadata reservedStateMetadata1 = ReservedStateMetadata.builder("namespace_two").putHandler(hmTwo).build();
        Metadata metadata = Metadata.builder()
            .put(
                IndexTemplateMetadata.builder("foo")
                    .patterns(Collections.singletonList("bar"))
                    .order(1)
                    .settings(Settings.builder().put("setting1", "value1").put("setting2", "value2"))
                    .putAlias(newAliasMetadataBuilder("alias-bar1"))