use of alluxio.job.wire.JobWorkerHealth in project alluxio by Alluxio.
the class JobMasterIntegrationTest method getAllWorkerHealth.
@Test
public void getAllWorkerHealth() throws Exception {
final AtomicReference<List<JobWorkerHealth>> singleton = new AtomicReference<>();
CommonUtils.waitFor("allWorkerHealth", () -> {
List<JobWorkerHealth> allWorkerHealth = mJobMaster.getAllWorkerHealth();
singleton.set(allWorkerHealth);
return allWorkerHealth.size() == 1;
});
List<JobWorkerHealth> allWorkerHealth = singleton.get();
JobWorkerHealth workerHealth = allWorkerHealth.get(0);
assertNotNull(workerHealth.getHostname());
assertEquals(3, workerHealth.getLoadAverage().size());
}
Aggregations