@Test public void assertShutdownInstanceIfLeaderAndReconcileServiceIsRunning() { when(leaderService.isLeader()).thenReturn(true); when(reconcileService.isRunning()).thenReturn(true); JobRegistry.getInstance().registerRegistryCenter("test_job", regCenter); JobRegistry.getInstance().registerJob("test_job", jobScheduleController); schedulerFacade.shutdownInstance(); verify(leaderService).removeLeader(); verify(reconcileService).stopAsync(); verify(jobScheduleController).shutdown(); }
public void shutdownInstance() { if (leaderService.isLeader()) { leaderService.removeLeader(); } if (reconcileService.isRunning()) { reconcileService.stopAsync(); } JobRegistry.getInstance().shutdown(jobName); }
SchedulerFacade { public void shutdownInstance() { if (leaderService.isLeader()) { leaderService.removeLeader(); } if (reconcileService.isRunning()) { reconcileService.stopAsync(); } JobRegistry.getInstance().shutdown(jobName); } }
SchedulerFacade { public void shutdownInstance() { if (leaderService.isLeader()) { leaderService.removeLeader(); } if (reconcileService.isRunning()) { reconcileService.stopAsync(); } JobRegistry.getInstance().shutdown(jobName); } SchedulerFacade(final CoordinatorRegistryCenter regCenter, final String jobName); }
SchedulerFacade { public void shutdownInstance() { if (leaderService.isLeader()) { leaderService.removeLeader(); } if (reconcileService.isRunning()) { reconcileService.stopAsync(); } JobRegistry.getInstance().shutdown(jobName); } SchedulerFacade(final CoordinatorRegistryCenter regCenter, final String jobName); JobTriggerListener newJobTriggerListener(); void shutdownInstance(); }
SchedulerFacade { public void shutdownInstance() { if (leaderService.isLeader()) { leaderService.removeLeader(); } if (reconcileService.isRunning()) { reconcileService.stopAsync(); } JobRegistry.getInstance().shutdown(jobName); } SchedulerFacade(final CoordinatorRegistryCenter regCenter, final String jobName); JobTriggerListener newJobTriggerListener(); void shutdownInstance();  }