}, Threads.SAME_THREAD_EXECUTOR);
Assert.assertTrue(running.await(30, TimeUnit.SECONDS));
// wait for 3 echo servers to come up
Iterable<Discoverable> echoServices = controller.discoverService("echo");
Assert.assertTrue(YarnTestUtils.waitForSize(echoServices, 3, 60));
ResourceReport report = controller.getResourceReport();
// make sure resources for echo1 and echo2 are there
Map<String, Collection<TwillRunResources>> usedResources = report.getResources();
Assert.assertEquals(2, usedResources.keySet().size());