use of com.github.dreamhead.moco.bootstrap.tasks.ShutdownTask in project moco by dreamhead.
the class ShutdownMonitorRunnerTest method should_stop_runner_via_shutdown_task.
@Test(expected = HttpHostConnectException.class)
public void should_stop_runner_via_shutdown_task() throws IOException {
runner.run();
try {
assertThat(helper.get(root()), is("foo"));
} catch (HttpHostConnectException e) {
fail(e.getMessage());
}
ShutdownTask task = new ShutdownTask(SHUTDOWN_MOCO_KEY);
task.run(new String[] { "-s", Integer.toString(SHUTDOWN_PORT) });
waitChangeHappens();
helper.get(root());
}
Aggregations