719 |
|
tasks.add(p.scheduleAtFixedRate(r, 9, 9, SECONDS)); |
720 |
|
tasks.add(p.scheduleWithFixedDelay(r, 9, 9, SECONDS)); |
721 |
|
} |
722 |
< |
assertEquals(new HashSet(tasks), new HashSet(p.getQueue())); |
722 |
> |
if (testImplementationDetails) |
723 |
> |
assertEquals(new HashSet(tasks), new HashSet(p.getQueue())); |
724 |
|
final List<Runnable> queuedTasks; |
725 |
|
try { |
726 |
|
queuedTasks = p.shutdownNow(); |
729 |
|
} |
730 |
|
assertTrue(p.isShutdown()); |
731 |
|
assertTrue(p.getQueue().isEmpty()); |
732 |
< |
assertEquals(new HashSet(tasks), new HashSet(queuedTasks)); |
732 |
> |
if (testImplementationDetails) |
733 |
> |
assertEquals(new HashSet(tasks), new HashSet(queuedTasks)); |
734 |
|
assertEquals(tasks.size(), queuedTasks.size()); |
735 |
|
for (ScheduledFuture task : tasks) { |
736 |
|
assertFalse(((CustomTask)task).ran); |