330 |
|
sync.acquire(1); |
331 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
332 |
|
public void realRun() throws InterruptedException { |
333 |
< |
sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000); |
333 |
> |
sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000L * 1000L); |
334 |
|
}}); |
335 |
|
|
336 |
|
t.start(); |
337 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
338 |
|
t.interrupt(); |
339 |
|
t.join(); |
340 |
|
} |
364 |
|
sync.acquire(1); |
365 |
|
Thread t = new Thread(new CheckedRunnable() { |
366 |
|
public void realRun() throws InterruptedException { |
367 |
< |
threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000)); |
367 |
> |
threadAssertFalse(sync.tryAcquireNanos(1, SHORT_DELAY_MS * 1000L * 1000L)); |
368 |
|
}}); |
369 |
|
|
370 |
|
t.start(); |
420 |
|
sync.acquireInterruptibly(1); |
421 |
|
Thread t = new Thread(new InterruptedSyncRunnable(sync)); |
422 |
|
t.start(); |
423 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
424 |
|
t.interrupt(); |
425 |
|
assertTrue(sync.isHeldExclusively()); |
426 |
|
t.join(); |
808 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
809 |
|
public void realRun() throws InterruptedException { |
810 |
|
sync.acquire(1); |
811 |
< |
c.awaitNanos(1000 * 1000 * 1000); // 1 sec |
811 |
> |
c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L); |
812 |
|
}}); |
813 |
|
|
814 |
|
t.start(); |
956 |
|
Thread t = new Thread(new CheckedRunnable() { |
957 |
|
public void realRun() throws InterruptedException { |
958 |
|
threadAssertFalse(l.isSignalled()); |
959 |
< |
threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000)); |
959 |
> |
threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L)); |
960 |
|
threadAssertTrue(l.isSignalled()); |
961 |
|
}}); |
962 |
|
|
993 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
994 |
|
public void realRun() throws InterruptedException { |
995 |
|
threadAssertFalse(l.isSignalled()); |
996 |
< |
l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000); |
996 |
> |
l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L); |
997 |
|
}}); |
998 |
|
|
999 |
|
t.start(); |
1011 |
|
Thread t = new Thread(new CheckedRunnable() { |
1012 |
|
public void realRun() throws InterruptedException { |
1013 |
|
threadAssertFalse(l.isSignalled()); |
1014 |
< |
threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000)); |
1014 |
> |
threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L)); |
1015 |
|
}}); |
1016 |
|
|
1017 |
|
t.start(); |