use of com.dangdang.ddframe.job.lite.internal.server.JobOperationListenerManager.JobPausedStatusJobListener in project elastic-job by dangdangdotcom.
the class JobOperationListenerManagerTest method assertJobPausedStatusJobListenerWhenIsJobPausedPathAndUpdate.
@Test
public void assertJobPausedStatusJobListenerWhenIsJobPausedPathAndUpdate() {
JobRegistry.getInstance().addJobScheduleController("test_job", jobScheduleController);
jobOperationListenerManager.new JobPausedStatusJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/test_job/servers/" + ip + "/paused", null, "".getBytes())), "/test_job/servers/" + ip + "/paused");
verify(jobScheduleController, times(0)).pauseJob();
verify(jobScheduleController, times(0)).resumeJob();
}
use of com.dangdang.ddframe.job.lite.internal.server.JobOperationListenerManager.JobPausedStatusJobListener in project elastic-job by dangdangdotcom.
the class JobOperationListenerManagerTest method assertJobPausedStatusJobListenerWhenIsJobPausedPathAndRemove.
@Test
public void assertJobPausedStatusJobListenerWhenIsJobPausedPathAndRemove() {
JobRegistry.getInstance().addJobScheduleController("test_job", jobScheduleController);
jobOperationListenerManager.new JobPausedStatusJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_REMOVED, new ChildData("/test_job/servers/" + ip + "/paused", null, "".getBytes())), "/test_job/servers/" + ip + "/paused");
verify(jobScheduleController, times(0)).pauseJob();
verify(jobScheduleController).resumeJob();
verify(serverService).clearJobPausedStatus();
}
use of com.dangdang.ddframe.job.lite.internal.server.JobOperationListenerManager.JobPausedStatusJobListener in project elastic-job by dangdangdotcom.
the class JobOperationListenerManagerTest method assertJobPausedStatusJobListenerWhenIsJobPausedPathButJobIsNotExisted.
@Test
public void assertJobPausedStatusJobListenerWhenIsJobPausedPathButJobIsNotExisted() {
jobOperationListenerManager.new JobPausedStatusJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/test_job/servers/" + ip + "/paused", null, "".getBytes())), "/test_job/servers/" + ip + "/paused");
verify(jobScheduleController, times(0)).pauseJob();
verify(jobScheduleController, times(0)).resumeJob();
}
use of com.dangdang.ddframe.job.lite.internal.server.JobOperationListenerManager.JobPausedStatusJobListener in project elastic-job by dangdangdotcom.
the class JobOperationListenerManagerTest method assertJobPausedStatusJobListenerWhenIsNotJobPausedPath.
@Test
public void assertJobPausedStatusJobListenerWhenIsNotJobPausedPath() {
jobOperationListenerManager.new JobPausedStatusJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_UPDATED, new ChildData("/test_job/servers/" + ip + "/other", null, "".getBytes())), "/test_job/servers/" + ip + "/other");
verify(jobScheduleController, times(0)).pauseJob();
verify(jobScheduleController, times(0)).resumeJob();
}
use of com.dangdang.ddframe.job.lite.internal.server.JobOperationListenerManager.JobPausedStatusJobListener in project elastic-job by dangdangdotcom.
the class JobOperationListenerManagerTest method assertJobPausedStatusJobListenerWhenIsJobPausedPathAndAdd.
@Test
public void assertJobPausedStatusJobListenerWhenIsJobPausedPathAndAdd() {
JobRegistry.getInstance().addJobScheduleController("test_job", jobScheduleController);
jobOperationListenerManager.new JobPausedStatusJobListener().dataChanged(null, new TreeCacheEvent(TreeCacheEvent.Type.NODE_ADDED, new ChildData("/test_job/servers/" + ip + "/paused", null, "".getBytes())), "/test_job/servers/" + ip + "/paused");
verify(jobScheduleController).pauseJob();
verify(jobScheduleController, times(0)).resumeJob();
}
Aggregations