[TEST] Ensure all nodes indicate job has been stopped
Original commit: elastic/x-pack-elasticsearch@39184b6c69
This commit is contained in:
parent
cb735b5f69
commit
e1aac25f2d
|
@ -6,6 +6,7 @@
|
|||
package org.elasticsearch.xpack.ml.integration;
|
||||
|
||||
import org.elasticsearch.ElasticsearchStatusException;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
|
@ -98,9 +99,11 @@ public class TooManyJobsIT extends BaseMlIntegTestCase {
|
|||
assertTrue(closeResponse.isClosed());
|
||||
client().execute(OpenJobAction.INSTANCE, openJobRequest).get();
|
||||
assertBusy(() -> {
|
||||
GetJobsStatsAction.Response statsResponse =
|
||||
client().execute(GetJobsStatsAction.INSTANCE, new GetJobsStatsAction.Request(job.getId())).actionGet();
|
||||
assertEquals(statsResponse.getResponse().results().get(0).getState(), JobState.OPENED);
|
||||
for (Client client : clients()) {
|
||||
GetJobsStatsAction.Response statsResponse =
|
||||
client.execute(GetJobsStatsAction.INSTANCE, new GetJobsStatsAction.Request(job.getId())).actionGet();
|
||||
assertEquals(statsResponse.getResponse().results().get(0).getState(), JobState.OPENED);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue