Skip to content

Commit 0719a32

Browse files
authored
[Transform] Reset plugin after tests (#122252) (#122422)
There is a race condition where the test is trying to clean up while the Transform auditor is still writing messages - resetting the plugin will stop the auditor (and properly reset it). Fix #12148
1 parent 6a8e041 commit 0719a32

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,6 @@ tests:
510510
- class: org.elasticsearch.xpack.security.profile.ProfileIntegTests
511511
method: testProfileAPIsWhenIndexNotCreated
512512
issue: https://github.com/elastic/elasticsearch/issues/121096
513-
- class: org.elasticsearch.xpack.transform.checkpoint.TransformCCSCanMatchIT
514-
method: testTransformLifecycle_RangeQueryThatMatchesNoShards
515-
issue: https://github.com/elastic/elasticsearch/issues/121480
516513
- class: org.elasticsearch.xpack.security.authc.service.ServiceAccountSingleNodeTests
517514
method: testAuthenticateWithServiceFileToken
518515
issue: https://github.com/elastic/elasticsearch/issues/120988

x-pack/plugin/transform/src/internalClusterTest/java/org/elasticsearch/xpack/transform/checkpoint/TransformCCSCanMatchIT.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import org.apache.lucene.index.PointValues;
1313
import org.apache.lucene.util.SetOnce;
1414
import org.elasticsearch.action.ActionListener;
15+
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateAction;
16+
import org.elasticsearch.action.admin.cluster.snapshots.features.ResetFeatureStateRequest;
1517
import org.elasticsearch.action.search.SearchRequest;
1618
import org.elasticsearch.action.support.IndicesOptions;
1719
import org.elasticsearch.action.support.master.AcknowledgedResponse;
@@ -61,6 +63,7 @@
6163
import org.elasticsearch.xpack.core.transform.transforms.TransformStats;
6264
import org.elasticsearch.xpack.core.transform.transforms.latest.LatestConfig;
6365
import org.elasticsearch.xpack.transform.LocalStateTransform;
66+
import org.junit.After;
6467
import org.junit.Before;
6568

6669
import java.io.IOException;
@@ -136,6 +139,11 @@ public void setUpNamedXContentRegistryAndIndices() throws Exception {
136139
remoteNewDocs = createIndexAndIndexDocs(REMOTE_CLUSTER, "remote_new_index", newRemoteNumShards, timestamp, randomBoolean());
137140
}
138141

142+
@After
143+
public void cleanup() {
144+
client().execute(ResetFeatureStateAction.INSTANCE, new ResetFeatureStateRequest(TEST_REQUEST_TIMEOUT)).actionGet();
145+
}
146+
139147
private int createIndexAndIndexDocs(String cluster, String index, int numberOfShards, long timestamp, boolean exposeTimestamp)
140148
throws Exception {
141149
Client client = client(cluster);

0 commit comments

Comments
 (0)