if (!(arg.getAllValues().get(0) instanceof AMSchedulerEventTALaunchRequest)) {
fail("Second event not of type "
+ AMSchedulerEventTALaunchRequest.class.getName());
}
// TODO Move the Rack request check to the client after TEZ-125 is fixed.
AMSchedulerEventTALaunchRequest lre = (AMSchedulerEventTALaunchRequest) arg
.getAllValues().get(0);
String[] requestedRacks = lre.getRacks();
assertEquals(1, requestedRacks.length);
assertEquals(3, lre.getHosts().length);
for (int i = 0; i < 3; i++) {
assertEquals("host" + (i + 1), lre.getHosts()[i]);
}
}