--- jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/21 17:54:04 1.31 +++ jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/30 08:31:09 1.32 @@ -327,10 +327,11 @@ public class AbstractQueuedSynchronizerT sync.acquire(1); Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { - sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000); + sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000L * 1000L); }}); t.start(); + Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); } @@ -360,7 +361,7 @@ public class AbstractQueuedSynchronizerT sync.acquire(1); Thread t = new Thread(new CheckedRunnable() { public void realRun() throws InterruptedException { - threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000)); + threadAssertFalse(sync.tryAcquireNanos(1, SHORT_DELAY_MS * 1000L * 1000L)); }}); t.start(); @@ -417,6 +418,7 @@ public class AbstractQueuedSynchronizerT sync.acquireInterruptibly(1); Thread t = new Thread(new InterruptedSyncRunnable(sync)); t.start(); + Thread.sleep(SHORT_DELAY_MS); t.interrupt(); assertTrue(sync.isHeldExclusively()); t.join(); @@ -804,7 +806,7 @@ public class AbstractQueuedSynchronizerT Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { sync.acquire(1); - c.awaitNanos(1000 * 1000 * 1000); // 1 sec + c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L); }}); t.start(); @@ -952,7 +954,7 @@ public class AbstractQueuedSynchronizerT Thread t = new Thread(new CheckedRunnable() { public void realRun() throws InterruptedException { threadAssertFalse(l.isSignalled()); - threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000)); + threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L)); threadAssertTrue(l.isSignalled()); }}); @@ -989,7 +991,7 @@ public class AbstractQueuedSynchronizerT Thread t = new Thread(new CheckedInterruptedRunnable() { public void realRun() throws InterruptedException { threadAssertFalse(l.isSignalled()); - l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000); + l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L); }}); t.start(); @@ -1007,7 +1009,7 @@ public class AbstractQueuedSynchronizerT Thread t = new Thread(new CheckedRunnable() { public void realRun() throws InterruptedException { threadAssertFalse(l.isSignalled()); - threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000)); + threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L)); }}); t.start();