From 4d9979f613d54996d2447d942b394b4f29fed74e Mon Sep 17 00:00:00 2001 From: Parker Timmins Date: Mon, 10 Feb 2025 14:49:07 -0600 Subject: [PATCH] Remove call to super.cleanupCluster in cleanup methods which does not override parent method (#122209) ReindexDataStreamIndexAction.cleanupCluster called EsIntegTestCase.cleanupCluster, but did not override it. This caused EsIntegTestCase.cleanupCluster to be called twice, once in ReindexDataStreamIndexAction.cleanupCluster and once when the After annotation is called on EsIntegTestCase. (cherry picked from commit 89ba03ecff8c4657a341371f3ddc8b116d67f9a0) # Conflicts: # muted-tests.yml --- .../ReindexDatastreamIndexTransportActionIT.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java b/x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java index 37311ca571413..a3642ddb664d4 100644 --- a/x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java +++ b/x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java @@ -24,8 +24,6 @@ import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.ingest.DeletePipelineRequest; -import org.elasticsearch.action.ingest.DeletePipelineTransportAction; import org.elasticsearch.action.ingest.PutPipelineRequest; import org.elasticsearch.action.ingest.PutPipelineTransportAction; import org.elasticsearch.cluster.block.ClusterBlockException; @@ -70,18 +68,8 @@ public class ReindexDatastreamIndexTransportActionIT extends ESIntegTestCase { @After - private void cleanupCluster() throws Exception { - safeGet( - clusterAdmin().execute( - DeletePipelineTransportAction.TYPE, - new DeletePipelineRequest( - TEST_REQUEST_TIMEOUT, - TEST_REQUEST_TIMEOUT, - MigrateTemplateRegistry.REINDEX_DATA_STREAM_PIPELINE_NAME - ) - ) - ); - super.cleanUpCluster(); + private void cleanup() { + deletePipeline(MigrateTemplateRegistry.REINDEX_DATA_STREAM_PIPELINE_NAME); } private static final String MAPPING = """