### CI Link

https://gradle-enterprise.elastic.co/s/oadbbzpxkn6tg/tests/:x-pack:plugin:enrich:qa:rest-with-security:javaRestTest/org.elasticsearch.xpack.enrich.EnrichSecurityIT/testBasicFlowDouble?top-execution=1

### Repro line

https://gradle-enterprise.elastic.co/s/oadbbzpxkn6tg

### Does it reproduce?

No

### Applicable branches

master

### Failure history

_No response_

### Failure excerpt

org.elasticsearch.client.WarningFailureException: method [PUT], host [http://127.0.0.1:41171], URI [/my-index/_doc/1?pipeline=my_pipeline], status line [HTTP/1.1 201 Created] 
Warnings: [index name [.monitoring-es-7-2022.02.01] starts with a dot '.', in the next major version, index names starting with a dot are reserved for hidden indices and system indices] |  
{"_index":"my-index","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1}


failed tests
EnrichSecurityIT » testBasicFlowDouble
EnrichSecurityIT » testDeleteExistingPipeline
EnrichSecurityIT » testBasicFlowDate
EnrichSecurityIT » testImmutablePolicy
EnrichSecurityIT » testBasicFlowKeyword
EnrichSecurityIT » testDeleteIsCaseSensitive



x-pack/plugin/enrich/qa/common/src/main/java/org/elasticsearch/test/enrich/CommonEnrichRestTestCase.java
request.setJsonEntity("""
            {"query": {"term": {"type": "enrich_coordinator_stats"}}}""");
        Map<String, ?> response;
        try {
            response = toMap(adminClient().performRequest(request));
        } catch (ResponseException e) {
            throw new AssertionError("error while searching", e);
        }
        int maxRemoteRequestsTotal = 0;
        int maxExecutedSearchesTotal = 0;
        List<?> hits = (List<?>) XContentMapValues.extractValue("hits.hits", response);
        assertThat(hits.size(), greaterThanOrEqualTo(1));
        for (Object o : hits) {
            Map<?, ?> hit = (Map<?, ?>) o;
            int foundRemoteRequestsTotal = (int) XContentMapValues.extractValue(
                "_source.enrich_coordinator_stats.remote_requests_total",
                hit
            );
            maxRemoteRequestsTotal = Math.max(maxRemoteRequestsTotal, foundRemoteRequestsTotal);
            int foundExecutedSearchesTotal = (int) XContentMapValues.extractValue(
                "_source.enrich_coordinator_stats.executed_searches_total",
                hit
            );
            maxExecutedSearchesTotal = Math.max(maxExecutedSearchesTotal, foundExecutedSearchesTotal);
        }
        assertThat(maxRemoteRequestsTotal, greaterThanOrEqualTo(1));
        assertThat(maxExecutedSearchesTotal, greaterThanOrEqualTo(1));
    }
}