Skip to content

Commit d712742

Browse files
authored
ES-125727 Fix for [CI] ReindexDataStreamTransportActionIT testAlreadyUpToDateDataStream failing (#126123) (#126135)
(cherry picked from commit d816845) # Conflicts: # muted-tests.yml
1 parent 00ffed0 commit d712742

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ tests:
255255
- class: org.elasticsearch.smoketest.MlWithSecurityIT
256256
method: test {yaml=ml/trained_model_cat_apis/Test cat trained models}
257257
issue: https://github.com/elastic/elasticsearch/issues/125750
258-
- class: org.elasticsearch.xpack.migrate.action.ReindexDataStreamTransportActionIT
259-
method: testAlreadyUpToDateDataStream
260-
issue: https://github.com/elastic/elasticsearch/issues/125727
261258
- class: org.elasticsearch.ingest.geoip.EnterpriseGeoIpDownloaderIT
262259
method: testEnterpriseDownloaderTask
263260
issue: https://github.com/elastic/elasticsearch/issues/126124

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ public void testAlreadyUpToDateDataStream() throws Exception {
6969
dataStreamName
7070
);
7171
final int backingIndexCount = createDataStream(dataStreamName);
72-
AcknowledgedResponse response = client().execute(
73-
new ActionType<AcknowledgedResponse>(ReindexDataStreamAction.NAME),
74-
reindexDataStreamRequest
75-
).actionGet();
72+
client().execute(new ActionType<AcknowledgedResponse>(ReindexDataStreamAction.NAME), reindexDataStreamRequest).actionGet();
7673
String persistentTaskId = "reindex-data-stream-" + dataStreamName;
7774
AtomicReference<ReindexDataStreamTask> runningTask = new AtomicReference<>();
7875
for (TransportService transportService : internalCluster().getInstances(TransportService.class)) {
@@ -91,12 +88,14 @@ public void testAlreadyUpToDateDataStream() throws Exception {
9188
);
9289
}
9390
ReindexDataStreamTask task = runningTask.get();
94-
assertNotNull(task);
95-
assertThat(task.getStatus().complete(), equalTo(true));
96-
assertNull(task.getStatus().exception());
97-
assertThat(task.getStatus().pending(), equalTo(0));
98-
assertThat(task.getStatus().inProgress(), equalTo(Set.of()));
99-
assertThat(task.getStatus().errors().size(), equalTo(0));
91+
assertBusy(() -> {
92+
assertNotNull(task);
93+
assertThat(task.getStatus().complete(), equalTo(true));
94+
assertNull(task.getStatus().exception());
95+
assertThat(task.getStatus().pending(), equalTo(0));
96+
assertThat(task.getStatus().inProgress(), equalTo(Set.of()));
97+
assertThat(task.getStatus().errors().size(), equalTo(0));
98+
});
10099

101100
assertBusy(() -> {
102101
GetMigrationReindexStatusAction.Response statusResponse = client().execute(

0 commit comments

Comments
 (0)