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

Comparing jsr166/src/test/tck/ForkJoinPoolTest.java (file contents):
Revision 1.32 by jsr166, Mon Oct 11 04:39:12 2010 UTC vs.
Revision 1.34 by jsr166, Thu Nov 18 19:14:34 2010 UTC

# Line 374 | Line 374 | public class ForkJoinPoolTest extends JS
374              TrackedRunnable task = trackedRunnable(SHORT_DELAY_MS);
375              assertFalse(task.isDone());
376              Future<?> future = e.submit(task);
377 <            future.get();
377 >            assertNull(future.get());
378              assertTrue(task.isDone());
379 +            assertFalse(future.isCancelled());
380          } finally {
381              joinPool(e);
382          }
# Line 389 | Line 390 | public class ForkJoinPoolTest extends JS
390          ExecutorService e = new ForkJoinPool(1);
391          try {
392              Future<String> future = e.submit(new StringTask());
393 <            String result = future.get();
394 <            assertSame(TEST_STRING, result);
393 >            assertSame(TEST_STRING, future.get());
394 >            assertTrue(future.isDone());
395 >            assertFalse(future.isCancelled());
396          } finally {
397              joinPool(e);
398          }
# Line 403 | Line 405 | public class ForkJoinPoolTest extends JS
405          ExecutorService e = new ForkJoinPool(1);
406          try {
407              Future<?> future = e.submit(new NoOpRunnable());
408 <            future.get();
408 >            assertNull(future.get());
409              assertTrue(future.isDone());
410 +            assertFalse(future.isCancelled());
411          } finally {
412              joinPool(e);
413          }
# Line 417 | Line 420 | public class ForkJoinPoolTest extends JS
420          ExecutorService e = new ForkJoinPool(1);
421          try {
422              Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
423 <            String result = future.get();
424 <            assertSame(TEST_STRING, result);
423 >            assertSame(TEST_STRING, future.get());
424 >            assertTrue(future.isDone());
425 >            assertFalse(future.isCancelled());
426          } finally {
427              joinPool(e);
428          }
# Line 426 | Line 430 | public class ForkJoinPoolTest extends JS
430  
431  
432      /**
433 <     * A submitted privileged action to completion
433 >     * A submitted privileged action runs to completion
434       */
435      public void testSubmitPrivilegedAction() throws Throwable {
436          Policy savedPolicy = null;
# Line 459 | Line 463 | public class ForkJoinPoolTest extends JS
463      }
464  
465      /**
466 <     * A submitted a privileged exception action runs to completion
466 >     * A submitted privileged exception action runs to completion
467       */
468      public void testSubmitPrivilegedExceptionAction() throws Throwable {
469          Policy savedPolicy = null;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines