**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
null,
            null,
            null,
            null
        );
        state = metadataIndexTemplateService.addIndexTemplateV2(state, true, "globalindextemplate2", secondGlobalIndexTemplate);
        ComposableIndexTemplate fooPatternIndexTemplate = new ComposableIndexTemplate(
            List.of("foo-*"),
            template,
            List.of("foo"),
            3L,
            null,
            null,
            null,
            null
        );
        state = metadataIndexTemplateService.addIndexTemplateV2(state, true, "foopatternindextemplate", fooPatternIndexTemplate);
        
        Template templateWithIndexHiddenSetting = new Template(
            Settings.builder().put(IndexMetadata.SETTING_INDEX_HIDDEN, true).build(),
            null,
            null
        );
        ComponentTemplate updatedComponentTemplate = new ComponentTemplate(templateWithIndexHiddenSetting, 2L, new HashMap<>());
        try {
            metadataIndexTemplateService.addComponentTemplate(state, false, "foo", updatedComponentTemplate);
            fail(
                "expecting an exception as updating the component template would yield the global templates to include the index.hidden "
                    + "setting"
            );