665 |
|
tasks.add(p.scheduleAtFixedRate(r, 9, 9, SECONDS)); |
666 |
|
tasks.add(p.scheduleWithFixedDelay(r, 9, 9, SECONDS)); |
667 |
|
} |
668 |
< |
assertEquals(new HashSet(tasks), new HashSet(p.getQueue())); |
668 |
> |
if (testImplementationDetails) |
669 |
> |
assertEquals(new HashSet(tasks), new HashSet(p.getQueue())); |
670 |
|
final List<Runnable> queuedTasks; |
671 |
|
try { |
672 |
|
queuedTasks = p.shutdownNow(); |
675 |
|
} |
676 |
|
assertTrue(p.isShutdown()); |
677 |
|
assertTrue(p.getQueue().isEmpty()); |
678 |
< |
assertEquals(new HashSet(tasks), new HashSet(queuedTasks)); |
678 |
> |
if (testImplementationDetails) |
679 |
> |
assertEquals(new HashSet(tasks), new HashSet(queuedTasks)); |
680 |
|
assertEquals(tasks.size(), queuedTasks.size()); |
681 |
|
for (ScheduledFuture task : tasks) { |
682 |
|
assertFalse(task.isDone()); |