use of com.dangdang.ddframe.job.lite.internal.config.ConfigurationListenerManager.CronSettingAndJobEventChangedJobListener in project elastic-job by dangdangdotcom.
the class ConfigurationListenerManagerTest method assertCronSettingChangedJobListenerWhenIsNotCronPath.
@Test
public void assertCronSettingChangedJobListenerWhenIsNotCronPath() {
configurationListenerManager.new CronSettingAndJobEventChangedJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/test_job/config/other", null, LiteJsonConstants.getJobJson().getBytes())), "/test_job/config/other");
verify(jobScheduleController, times(0)).rescheduleJob(Matchers.<String>any());
}
use of com.dangdang.ddframe.job.lite.internal.config.ConfigurationListenerManager.CronSettingAndJobEventChangedJobListener in project elastic-job by dangdangdotcom.
the class ConfigurationListenerManagerTest method assertCronSettingChangedJobListenerWhenIsCronPathButNotUpdate.
@Test
public void assertCronSettingChangedJobListenerWhenIsCronPathButNotUpdate() {
configurationListenerManager.new CronSettingAndJobEventChangedJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/test_job/config", null, LiteJsonConstants.getJobJson().getBytes())), "/test_job/config");
verify(jobScheduleController, times(0)).rescheduleJob(Matchers.<String>any());
}
use of com.dangdang.ddframe.job.lite.internal.config.ConfigurationListenerManager.CronSettingAndJobEventChangedJobListener in project elastic-job by dangdangdotcom.
the class ConfigurationListenerManagerTest method assertCronSettingChangedJobListenerWhenIsCronPathAndUpdateAndFindJob.
@Test
public void assertCronSettingChangedJobListenerWhenIsCronPathAndUpdateAndFindJob() {
JobRegistry.getInstance().addJobScheduleController("test_job", jobScheduleController);
configurationListenerManager.new CronSettingAndJobEventChangedJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/test_job/config", null, LiteJsonConstants.getJobJson().getBytes())), "/test_job/config");
verify(jobScheduleController).rescheduleJob("0/1 * * * * ?");
}
use of com.dangdang.ddframe.job.lite.internal.config.ConfigurationListenerManager.CronSettingAndJobEventChangedJobListener in project elastic-job by dangdangdotcom.
the class ConfigurationListenerManagerTest method assertCronSettingChangedJobListenerWhenIsCronPathAndUpdateButCannotFindJob.
@Test
public void assertCronSettingChangedJobListenerWhenIsCronPathAndUpdateButCannotFindJob() {
configurationListenerManager.new CronSettingAndJobEventChangedJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/test_job/config", null, LiteJsonConstants.getJobJson().getBytes())), "/test_job/config");
verify(jobScheduleController, times(0)).rescheduleJob(Matchers.<String>any());
}
Aggregations