use of org.apache.heron.spi.scheduler.ILauncher in project heron by twitter.
the class LaunchRunnerTest method testSetTopologyFail.
@Test(expected = LauncherException.class)
public void testSetTopologyFail() throws Exception {
Config runtime = createRunnerRuntime();
Config config = createRunnerConfig();
ILauncher launcher = Runtime.launcherClassInstance(runtime);
LaunchRunner launchRunner = new LaunchRunner(config, runtime);
SchedulerStateManagerAdaptor statemgr = Runtime.schedulerStateManagerAdaptor(runtime);
when(statemgr.setTopology(any(TopologyAPI.Topology.class), eq(TOPOLOGY_NAME))).thenReturn(false);
try {
launchRunner.call();
} finally {
verify(launcher, never()).launch(any(PackingPlan.class));
}
}
Aggregations