mirror of https://github.com/apache/activemq.git
Fix intermittent test failure
(cherry picked from commit 2c828b23df
)
This commit is contained in:
parent
3903ea08ab
commit
3597fd9614
|
@ -223,7 +223,8 @@ public class InMemoryJobScheduler implements JobScheduler {
|
|||
long startTime = System.currentTimeMillis();
|
||||
long executionTime = 0;
|
||||
// round startTime - so we can schedule more jobs at the same time
|
||||
startTime = ((startTime + 500) / 1000) * 1000;
|
||||
startTime = ((startTime + 500) / 500) * 500;
|
||||
|
||||
if (cronEntry != null && cronEntry.length() > 0) {
|
||||
try {
|
||||
executionTime = CronParser.getNextScheduledTime(cronEntry, startTime);
|
||||
|
|
|
@ -227,9 +227,9 @@ public class JobSchedulerImpl extends ServiceSupport implements Runnable, JobSch
|
|||
|
||||
private void doSchedule(final String jobId, final ByteSequence payload, final String cronEntry, long delay, long period, int repeat) throws IOException {
|
||||
long startTime = System.currentTimeMillis();
|
||||
// round startTime - so we can schedule more jobs
|
||||
// at the same time
|
||||
startTime = ((startTime + 500) / 1000) * 1000;
|
||||
// round startTime - so we can schedule more jobs at the same time
|
||||
startTime = ((startTime + 500) / 500) * 500;
|
||||
|
||||
long time = 0;
|
||||
if (cronEntry != null && cronEntry.length() > 0) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue