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

Comparing jsr166/src/test/tck/FutureTaskTest.java (file contents):
Revision 1.54 by jsr166, Sun Aug 11 22:29:26 2019 UTC vs.
Revision 1.55 by jsr166, Thu Sep 5 21:37:25 2019 UTC

# Line 754 | Line 754 | public class FutureTaskTest extends JSR1
754          final FutureTask task = new FutureTask(new NoOpCallable());
755          Thread t = newStartedThread(new CheckedRunnable() {
756              public void realRun() throws Exception {
757                long startTime = System.nanoTime();
758
757                  Thread.currentThread().interrupt();
758                  try {
759                      task.get(randomTimeout(), randomTimeUnit());
# Line 765 | Line 763 | public class FutureTaskTest extends JSR1
763  
764                  pleaseInterrupt.countDown();
765                  try {
766 <                    task.get(LONG_DELAY_MS, MILLISECONDS);
766 >                    task.get(LONGER_DELAY_MS, MILLISECONDS);
767                      shouldThrow();
768                  } catch (InterruptedException success) {}
769                  assertFalse(Thread.interrupted());
772
773                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
770              }});
771  
772          await(pleaseInterrupt);
773 +        if (randomBoolean()) assertThreadBlocks(t, Thread.State.TIMED_WAITING);
774          t.interrupt();
775          awaitTermination(t);
776          checkNotDone(task);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines