fix TransformRobustnessIT intermittent test failures

ensure the cluster is not in some intermediate state when cleaning up.

fixes #51347
This commit is contained in:
Hendrik Muhs 2020-01-24 15:18:19 +01:00
parent d0fbf71314
commit d177747f66

View File

@ -363,9 +363,12 @@ public abstract class TransformRestTestCase extends ESRestTestCase {
}
@After
public void waitForDataFrame() throws Exception {
wipeTransforms();
waitForPendingDataFrameTasks();
public void waitForTransform() throws Exception {
if (preserveClusterUponCompletion() == false) {
ensureNoInitializingShards();
wipeTransforms();
waitForPendingTransformTasks();
}
}
@AfterClass
@ -416,7 +419,7 @@ public abstract class TransformRestTestCase extends ESRestTestCase {
}
}
protected static void waitForPendingDataFrameTasks() throws Exception {
protected static void waitForPendingTransformTasks() throws Exception {
waitForPendingTasks(adminClient(), taskName -> taskName.startsWith(TransformField.TASK_NAME) == false);
}