Skip to content

Commit

Permalink
[Transform] fix TransformRobustnessIT intermittent test failures part…
Browse files Browse the repository at this point in the history
… 2 (#51523)

add wait for completion in transform robustness test to avoid occasional test failures during cleanup

fixes #51347
  • Loading branch information
Hendrik Muhs committed Jan 28, 2020
1 parent 075d969 commit 570758e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ public void testTaskRemovalAfterInternalIndexGotDeleted() throws Exception {
containsString("Detected transforms with no config [" + transformId + "]. Use force to stop/delete them.")
);
stopTransformRequest.addParameter(TransformField.FORCE.getPreferredName(), Boolean.toString(true));

// make sync, to avoid in-flux state, see gh#51347
stopTransformRequest.addParameter(TransformField.WAIT_FOR_COMPLETION.getPreferredName(), Boolean.toString(true));

Map<String, Object> stopTransformResponse = entityAsMap(client().performRequest(stopTransformRequest));
assertThat(stopTransformResponse.get("acknowledged"), equalTo(Boolean.TRUE));

// the task is gone
assertEquals(1, getNumberOfTransformTasks());
assertEquals(0, getNumberOfTransformTasks());
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 570758e

Please sign in to comment.