use of org.apache.heron.scheduler.SchedulerMain in project heron by twitter.
the class HeronMasterDriverTest method onNextStartTimeStartsSchedulerTManager.
@Test
@PrepareForTest({ HeronReefUtils.class, SchedulerMain.class })
public void onNextStartTimeStartsSchedulerTManager() throws Exception {
PowerMockito.spy(HeronReefUtils.class);
PowerMockito.doNothing().when(HeronReefUtils.class, "extractPackageInSandbox", anyString(), anyString(), anyString());
SchedulerMain mockScheduler = mock(SchedulerMain.class);
PowerMockito.spy(SchedulerMain.class);
PowerMockito.doReturn(mockScheduler).when(SchedulerMain.class, "createInstance", anyString(), anyString(), anyString(), anyString(), anyString(), eq(0), eq(false));
spyDriver.new HeronSchedulerLauncher().onNext(new StartTime(System.currentTimeMillis()));
verify(mockScheduler, times(1)).runScheduler();
}
Aggregations