Follow changes for interface JobScheduler

This commit is contained in:
Andrey Kan 2024-10-10 18:55:14 -04:00
parent 9f176cfd21
commit 3759d25f0d
1 changed files with 4 additions and 4 deletions

View File

@ -144,12 +144,12 @@ public class JobSchedulerTest {
assertEquals(size, COUNT);
long removeTime = scheduler.getNextScheduleTime();
scheduler.remove(removeTime);
scheduler.remove(removeTime, null);
// If all jobs are not started within the same second we need to call remove again
if (size != 0) {
removeTime = scheduler.getNextScheduleTime();
scheduler.remove(removeTime);
scheduler.remove(removeTime, null);
}
size = scheduler.getAllJobs().size();
@ -172,7 +172,7 @@ public class JobSchedulerTest {
int size = scheduler.getAllJobs().size();
assertEquals(size, COUNT + 1);
scheduler.remove(test);
scheduler.remove(test, null);
size = scheduler.getAllJobs().size();
assertEquals(size, COUNT);
}
@ -264,7 +264,7 @@ public class JobSchedulerTest {
}
start = System.currentTimeMillis();
long finish = start + 12000 + (COUNT * 1000);
scheduler.removeAllJobs(start, finish);
scheduler.removeAllJobs(start, finish, null);
assertTrue(scheduler.getAllJobs().isEmpty());
}