Skip to content

Commit ada0616

Browse files
author
Hendrik Muhs
authored
fix TransformRobustnessIT intermittent test failures (#51420)
ensure the cluster is not in some intermediate state when cleaning up. fixes #51347
1 parent 03df107 commit ada0616

File tree

1 file changed

+7
-4
lines changed
  • x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration

1 file changed

+7
-4
lines changed

x-pack/plugin/transform/qa/single-node-tests/src/test/java/org/elasticsearch/xpack/transform/integration/TransformRestTestCase.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,12 @@ protected static void deleteTransform(String transformId) throws IOException {
363363
}
364364

365365
@After
366-
public void waitForDataFrame() throws Exception {
367-
wipeTransforms();
368-
waitForPendingDataFrameTasks();
366+
public void waitForTransform() throws Exception {
367+
if (preserveClusterUponCompletion() == false) {
368+
ensureNoInitializingShards();
369+
wipeTransforms();
370+
waitForPendingTransformTasks();
371+
}
369372
}
370373

371374
@AfterClass
@@ -416,7 +419,7 @@ public void wipeTransforms() throws IOException {
416419
}
417420
}
418421

419-
protected static void waitForPendingDataFrameTasks() throws Exception {
422+
protected static void waitForPendingTransformTasks() throws Exception {
420423
waitForPendingTasks(adminClient(), taskName -> taskName.startsWith(TransformField.TASK_NAME) == false);
421424
}
422425

0 commit comments

Comments
 (0)