// Increase number of instances again
controller.changeInstances("EchoServer", 2);
Assert.assertTrue(YarnTestUtils.waitForSize(echoServices, 2, 60));
// Make sure still only one app is running
Iterable<TwillRunner.LiveInfo> apps = runner.lookupLive();
Assert.assertTrue(YarnTestUtils.waitForSize(apps, 1, 60));
// Creates a new runner service to check it can regain control over running app.
TwillRunnerService runnerService = YarnTestUtils.createTwillRunnerService(tmpFolder.newFolder());
runnerService.startAndWait();