### 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
private List<String> cleanupPipelines = new ArrayList<>();
    /**
     * Registers a pipeline for subsequent post-test clean up (i.e. DELETE),
     * see {@link CommonEnrichRestTestCase#deletePipelinesAndPolicies()}.
     *
     * @param pipeline the name of the pipeline to clean up
     */
    public void cleanupPipelineAfterTest(String pipeline) {
        cleanupPipelines.add(pipeline);
    }
    @After
    public void deletePipelinesAndPolicies() throws Exception {
        
        for (String pipeline : cleanupPipelines) {
            String endpoint = "/_ingest/pipeline/" + pipeline;
            assertOK(client().performRequest(new Request("DELETE", endpoint)));
        }
        cleanupPipelines.clear();
        
        Map<String, Object> responseMap = toMap(adminClient().performRequest(new Request("GET", "/_enrich/policy")));
        List<Map<?, ?>> policies = unsafeGetProperty(responseMap, "policies");
        for (Map<?, ?> entry : policies) {
            Map<?, Map<String, ?>> config = unsafeGetProperty(entry, "config");
            Map<String, ?> policy = config.values().iterator().next();
            String endpoint = "/_enrich/policy/" + policy.get("name");
            assertOK(client().performRequest(new Request("DELETE", endpoint)));
            List<?> sourceIndices = (List<?>) policy.get("indices");
            for (Object sourceIndex : sourceIndices) {
                try {
                    client().performRequest(new Request("DELETE", "/" + sourceIndex));