[TEST] wait for cs version to be the same on all nodes before stopping datafeed

Original commit: elastic/x-pack-elasticsearch@6fd6224047
This commit is contained in:
Martijn van Groningen 2017-04-05 11:37:27 +02:00
parent 4b2680dac7
commit 2b5c0faebd
1 changed files with 1 additions and 0 deletions

View File

@ -149,6 +149,7 @@ public class MlBasicMultiNodeIT extends ESRestTestCase {
response = client().performRequest("post", MachineLearning.BASE_PATH + "datafeeds/" + datafeedId + "/_stop"); response = client().performRequest("post", MachineLearning.BASE_PATH + "datafeeds/" + datafeedId + "/_stop");
assertEquals(200, response.getStatusLine().getStatusCode()); assertEquals(200, response.getStatusLine().getStatusCode());
assertEquals(Collections.singletonMap("stopped", true), responseEntityToMap(response)); assertEquals(Collections.singletonMap("stopped", true), responseEntityToMap(response));
assertBusy(this::assertSameClusterStateOnAllNodes);
response = client().performRequest("post", MachineLearning.BASE_PATH + "anomaly_detectors/" + jobId + "/_close", response = client().performRequest("post", MachineLearning.BASE_PATH + "anomaly_detectors/" + jobId + "/_close",
Collections.singletonMap("timeout", "20s")); Collections.singletonMap("timeout", "20s"));