use of com.enonic.xp.impl.scheduler.SchedulerExecutorService in project xp by enonic.
the class SchedulerServiceImplTest method modifyWithDispose.
@Test
void modifyWithDispose() {
final ScheduledJobName name = ScheduledJobName.from("test");
adminContext().callWith(() -> schedulerService.create(CreateScheduledJobParams.create().name(name).descriptor(DescriptorKey.from(ApplicationKey.from("com.enonic.app.test"), "task1")).calendar(calendarService.oneTime(Instant.parse("2021-02-25T10:44:33.170079900Z"))).config(new PropertyTree()).enabled(true).build()));
adminContext().callWith(() -> schedulerService.modify(ModifyScheduledJobParams.create().name(name).editor(edit -> edit.enabled = false).build()));
verify(schedulerExecutorService, times(1)).dispose(eq("test"));
}
Aggregations