[TEST] wait for yellow, to give ml indices time to get ready, open job api fails otherwise

Original commit: elastic/x-pack-elasticsearch@b1002cd289
This commit is contained in:
Martijn van Groningen 2017-03-02 09:50:45 +01:00
parent b5db0d9f44
commit 0f5bfca69a
1 changed files with 1 additions and 0 deletions

View File

@ -349,6 +349,7 @@ public class BasicDistributedJobsIT extends BaseMlIntegTestCase {
.put(MachineLearning.ML_ENABLED.getKey(), false));
ensureStableCluster(2, mlNode);
ensureStableCluster(2, nonMlNode);
ensureYellow(); // at least the primary shards of the indices a job uses should be started
client().execute(OpenJobAction.INSTANCE, openJobRequest).actionGet();
assertBusy(() -> assertJobTask("job_id", JobState.OPENED, true));
}