equal
deleted
inserted
replaced
53 import java.util.concurrent.RejectedExecutionException; |
53 import java.util.concurrent.RejectedExecutionException; |
54 import java.util.concurrent.atomic.AtomicBoolean; |
54 import java.util.concurrent.atomic.AtomicBoolean; |
55 import java.util.concurrent.atomic.AtomicInteger; |
55 import java.util.concurrent.atomic.AtomicInteger; |
56 import java.util.concurrent.locks.ReentrantLock; |
56 import java.util.concurrent.locks.ReentrantLock; |
57 |
57 |
58 import junit.framework.AssertionFailedError; |
|
59 import junit.framework.Test; |
58 import junit.framework.Test; |
60 import junit.framework.TestSuite; |
59 import junit.framework.TestSuite; |
61 |
60 |
62 public class ForkJoinPoolTest extends JSR166TestCase { |
61 public class ForkJoinPoolTest extends JSR166TestCase { |
63 public static void main(String[] args) { |
62 public static void main(String[] args) { |
329 p.invoke(f); |
328 p.invoke(f); |
330 assertSame(ForkJoinPool.defaultForkJoinWorkerThreadFactory, |
329 assertSame(ForkJoinPool.defaultForkJoinWorkerThreadFactory, |
331 p.getFactory()); |
330 p.getFactory()); |
332 while (! p.isQuiescent()) { |
331 while (! p.isQuiescent()) { |
333 if (millisElapsedSince(startTime) > LONG_DELAY_MS) |
332 if (millisElapsedSince(startTime) > LONG_DELAY_MS) |
334 throw new AssertionFailedError("timed out"); |
333 throw new AssertionError("timed out"); |
335 assertFalse(p.getAsyncMode()); |
334 assertFalse(p.getAsyncMode()); |
336 assertFalse(p.isShutdown()); |
335 assertFalse(p.isShutdown()); |
337 assertFalse(p.isTerminating()); |
336 assertFalse(p.isTerminating()); |
338 assertFalse(p.isTerminated()); |
337 assertFalse(p.isTerminated()); |
339 Thread.yield(); |
338 Thread.yield(); |