Skip to content

Commit

Permalink
fix TransformRobustnessIT intermittent test failures (#51420)
Browse files Browse the repository at this point in the history
ensure the cluster is not in some intermediate state when cleaning up.

fixes #51347
  • Loading branch information
Hendrik Muhs authored Jan 24, 2020
1 parent 03df107 commit ada0616
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,12 @@ protected static void deleteTransform(String transformId) throws IOException {
}

@After
public void waitForDataFrame() throws Exception {
wipeTransforms();
waitForPendingDataFrameTasks();
public void waitForTransform() throws Exception {
if (preserveClusterUponCompletion() == false) {
ensureNoInitializingShards();
wipeTransforms();
waitForPendingTransformTasks();
}
}

@AfterClass
Expand Down Expand Up @@ -416,7 +419,7 @@ public void wipeTransforms() throws IOException {
}
}

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

Expand Down

0 comments on commit ada0616

Please sign in to comment.