**Build scan:**
https://gradle-enterprise.elastic.co/s/xu6ijk42rlpz6/tests/:server:test/org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests/classMethod

**Reproduction line:**
`null`

**Applicable branches:**
master

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.cluster.metadata.MetadataIndexTemplateServiceTests&tests.test=classMethod

**Failure excerpt:**
```
java.lang.Exception: Suite timeout exceeded (>= 1200000 msec).

  at __randomizedtesting.SeedInfo.seed([D2D61EA6CB56462F]:0)

```
server/src/test/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateServiceTests.java
0L,
            1L,
            null,
            null,
            null
        );
        state = service.addIndexTemplateV2(state, true, "my-template", it);
        List<Map<String, AliasMetadata>> resolvedAliases = MetadataIndexTemplateService.resolveAliases(state.metadata(), "my-template");
        
        assertThat(resolvedAliases, equalTo(List.of(a3, a1, a2)));
    }
    public void testAddInvalidTemplate() throws Exception {
        ComposableIndexTemplate template = new ComposableIndexTemplate(
            Collections.singletonList("a"),
            null,
            Arrays.asList("good", "bad"),
            null,
            null,
            null
        );
        ComponentTemplate ct = new ComponentTemplate(new Template(Settings.EMPTY, null, null), null, null);
        final MetadataIndexTemplateService service = getMetadataIndexTemplateService();
        CountDownLatch ctLatch = new CountDownLatch(1);
        service.putComponentTemplate(
            "api",
            randomBoolean(),
            "good",
            TimeValue.timeValueSeconds(5),
            ct,
            ActionListener.wrap(r -> ctLatch.countDown(), e -> {