--- jsr166/src/test/tck/ReentrantReadWriteLockTest.java 2009/11/21 10:25:05 1.37 +++ jsr166/src/test/tck/ReentrantReadWriteLockTest.java 2010/08/25 00:07:03 1.41 @@ -15,7 +15,7 @@ import java.util.*; public class ReentrantReadWriteLockTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run (suite()); + junit.textui.TestRunner.run(suite()); } public static Test suite() { return new TestSuite(ReentrantReadWriteLockTest.class); @@ -215,10 +215,11 @@ public class ReentrantReadWriteLockTest lock.writeLock().lock(); Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { - lock.writeLock().tryLock(1000,MILLISECONDS); + lock.writeLock().tryLock(SMALL_DELAY_MS, MILLISECONDS); }}); t.start(); + Thread.sleep(SHORT_DELAY_MS); t.interrupt(); lock.writeLock().unlock(); t.join(); @@ -251,10 +252,11 @@ public class ReentrantReadWriteLockTest lock.writeLock().lock(); Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { - lock.readLock().tryLock(1000,MILLISECONDS); + lock.readLock().tryLock(LONG_DELAY_MS, MILLISECONDS); }}); t.start(); + Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); } @@ -897,7 +899,7 @@ public class ReentrantReadWriteLockTest Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { lock.writeLock().lock(); - c.awaitNanos(SHORT_DELAY_MS * 2 * 1000000); + c.awaitNanos(MILLISECONDS.toNanos(LONG_DELAY_MS)); lock.writeLock().unlock(); }});