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 authored Jan 28, 2020
1 parent 2c0bc27 commit 7f37ac8
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 7f37ac8

Please sign in to comment.