Skip to content

Commit c89ac93

Browse files
committed
Delete pipeline only in relevant tests rather than cleanup
1 parent 3f021a1 commit c89ac93

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,6 @@ tests:
407407
- class: org.elasticsearch.xpack.security.authz.IndexAliasesTests
408408
method: testRemoveIndex
409409
issue: https://github.com/elastic/elasticsearch/issues/122221
410-
- class: org.elasticsearch.xpack.migrate.action.ReindexDatastreamIndexTransportActionIT
411-
issue: https://github.com/elastic/elasticsearch/issues/121737
412410
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
413411
method: testGroupingMultiValueByOrdinals
414412
issue: https://github.com/elastic/elasticsearch/issues/122228

x-pack/plugin/migrate/src/internalClusterTest/java/org/elasticsearch/xpack/migrate/action/ReindexDatastreamIndexTransportActionIT.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import org.elasticsearch.xcontent.XContentType;
5050
import org.elasticsearch.xpack.migrate.MigratePlugin;
5151
import org.elasticsearch.xpack.migrate.MigrateTemplateRegistry;
52-
import org.junit.After;
5352

5453
import java.io.IOException;
5554
import java.time.Instant;
@@ -67,10 +66,6 @@
6766
import static org.hamcrest.Matchers.equalTo;
6867

6968
public class ReindexDatastreamIndexTransportActionIT extends ESIntegTestCase {
70-
@After
71-
private void cleanup() {
72-
deletePipeline(MigrateTemplateRegistry.REINDEX_DATA_STREAM_PIPELINE_NAME);
73-
}
7469

7570
private static final String MAPPING = """
7671
{
@@ -108,6 +103,10 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
108103
""";
109104

110105
public void testTimestamp0AddedIfMissing() {
106+
// Delete pipeline in case is a custom pipeline from another test
107+
// MigrateTemplateRegistry will immediately rebuild pipeline
108+
deletePipeline(MigrateTemplateRegistry.REINDEX_DATA_STREAM_PIPELINE_NAME);
109+
111110
var sourceIndex = randomAlphaOfLength(20).toLowerCase(Locale.ROOT);
112111
safeGet(indicesAdmin().create(new CreateIndexRequest(sourceIndex)));
113112

@@ -129,6 +128,10 @@ public void testTimestamp0AddedIfMissing() {
129128
}
130129

131130
public void testTimestampNotAddedIfExists() {
131+
// Delete pipeline in case is a custom pipeline from another test
132+
// MigrateTemplateRegistry will immediately rebuild pipeline
133+
deletePipeline(MigrateTemplateRegistry.REINDEX_DATA_STREAM_PIPELINE_NAME);
134+
132135
var sourceIndex = randomAlphaOfLength(20).toLowerCase(Locale.ROOT);
133136
safeGet(indicesAdmin().create(new CreateIndexRequest(sourceIndex)));
134137

0 commit comments

Comments
 (0)