[ML] Wait for green after opening job in NetworkDisruptionIT (#50232)

Closes #49908
This commit is contained in:
David Kyle 2019-12-16 14:55:01 +00:00
parent 32b2445744
commit 5542686283
1 changed files with 1 additions and 1 deletions

View File

@ -48,11 +48,11 @@ public class NetworkDisruptionIT extends BaseMlIntegTestCase {
Job.Builder job = createJob("relocation-job", new ByteSizeValue(2, ByteSizeUnit.MB)); Job.Builder job = createJob("relocation-job", new ByteSizeValue(2, ByteSizeUnit.MB));
PutJobAction.Request putJobRequest = new PutJobAction.Request(job); PutJobAction.Request putJobRequest = new PutJobAction.Request(job);
client().execute(PutJobAction.INSTANCE, putJobRequest).actionGet(); client().execute(PutJobAction.INSTANCE, putJobRequest).actionGet();
ensureGreen();
OpenJobAction.Request openJobRequest = new OpenJobAction.Request(job.getId()); OpenJobAction.Request openJobRequest = new OpenJobAction.Request(job.getId());
AcknowledgedResponse openJobResponse = client().execute(OpenJobAction.INSTANCE, openJobRequest).actionGet(); AcknowledgedResponse openJobResponse = client().execute(OpenJobAction.INSTANCE, openJobRequest).actionGet();
assertTrue(openJobResponse.isAcknowledged()); assertTrue(openJobResponse.isAcknowledged());
ensureGreen();
// Record which node the job starts off on // Record which node the job starts off on
String origJobNode = awaitJobOpenedAndAssigned(job.getId(), null); String origJobNode = awaitJobOpenedAndAssigned(job.getId(), null);