--- jsr166/src/test/tck/JSR166TestCase.java 2011/05/27 19:29:59 1.83 +++ jsr166/src/test/tck/JSR166TestCase.java 2011/05/29 14:18:52 1.85 @@ -283,7 +283,7 @@ public class JSR166TestCase extends Test * milliseconds in the future. */ Date delayedDate(long delayMillis) { - return new Date(new Date().getTime() + delayMillis); + return new Date(System.currentTimeMillis() + delayMillis); } /** @@ -307,9 +307,13 @@ public class JSR166TestCase extends Test } /** + * Extra checks that get done for all test cases. + * * Triggers test case failure if any thread assertions have failed, * by rethrowing, in the test harness thread, any exception recorded * earlier by threadRecordFailure. + * + * Triggers test case failure if interrupt status is set in the main thread. */ public void tearDown() throws Exception { Throwable t = threadFailure.getAndSet(null); @@ -327,6 +331,9 @@ public class JSR166TestCase extends Test throw afe; } } + + if (Thread.interrupted()) + throw new AssertionFailedError("interrupt status set in main thread"); } /**