[TEST] wait for cs version to be the same on all nodes before stopping datafeed
Original commit: elastic/x-pack-elasticsearch@6fd62240479167bfe88742bb1769eec6bff55f89
@@ -149,6 +149,7 @@ public class MlBasicMultiNodeIT extends ESRestTestCase {
response = client().performRequest("post", MachineLearning.BASE_PATH + "datafeeds/" + datafeedId + "/_stop");
assertEquals(200, response.getStatusLine().getStatusCode());
assertEquals(Collections.singletonMap("stopped", true), responseEntityToMap(response));
+ assertBusy(this::assertSameClusterStateOnAllNodes);
response = client().performRequest("post", MachineLearning.BASE_PATH + "anomaly_detectors/" + jobId + "/_close",
Collections.singletonMap("timeout", "20s"));
