ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadPoolExecutorTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.10 by dl, Sat Nov 1 18:37:02 2003 UTC vs.
Revision 1.11 by dl, Thu Dec 4 20:54:46 2003 UTC

# Line 332 | Line 332 | public class ThreadPoolExecutorTest exte
332      public void testGetQueue() {
333          BlockingQueue<Runnable> q = new ArrayBlockingQueue<Runnable>(10);
334          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, q);
335 <        CancellableTask[] tasks = new CancellableTask[5];
335 >        FutureTask[] tasks = new FutureTask[5];
336          for(int i = 0; i < 5; i++){
337 <            tasks[i] = new CancellableTask(new MediumPossiblyInterruptedRunnable());
337 >            tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
338              p1.execute(tasks[i]);
339          }
340          try {
# Line 357 | Line 357 | public class ThreadPoolExecutorTest exte
357      public void testRemove() {
358          BlockingQueue<Runnable> q = new ArrayBlockingQueue<Runnable>(10);
359          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, q);
360 <        CancellableTask[] tasks = new CancellableTask[5];
360 >        FutureTask[] tasks = new FutureTask[5];
361          for(int i = 0; i < 5; i++){
362 <            tasks[i] = new CancellableTask(new MediumPossiblyInterruptedRunnable());
362 >            tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
363              p1.execute(tasks[i]);
364          }
365          try {
# Line 386 | Line 386 | public class ThreadPoolExecutorTest exte
386       */
387      public void testPurge() {
388          ThreadPoolExecutor p1 = new ThreadPoolExecutor(1, 1, LONG_DELAY_MS, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10));
389 <        CancellableTask[] tasks = new CancellableTask[5];
389 >        FutureTask[] tasks = new FutureTask[5];
390          for(int i = 0; i < 5; i++){
391 <            tasks[i] = new CancellableTask(new MediumPossiblyInterruptedRunnable());
391 >            tasks[i] = new FutureTask(new MediumPossiblyInterruptedRunnable(), Boolean.TRUE);
392              p1.execute(tasks[i]);
393          }
394          tasks[4].cancel(true);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines