327 |
|
sync.acquire(1); |
328 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
329 |
|
public void realRun() throws InterruptedException { |
330 |
< |
sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000); |
330 |
> |
sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000L * 1000L); |
331 |
|
}}); |
332 |
|
|
333 |
|
t.start(); |
334 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
335 |
|
t.interrupt(); |
336 |
|
t.join(); |
337 |
|
} |
361 |
|
sync.acquire(1); |
362 |
|
Thread t = new Thread(new CheckedRunnable() { |
363 |
|
public void realRun() throws InterruptedException { |
364 |
< |
threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000)); |
364 |
> |
threadAssertFalse(sync.tryAcquireNanos(1, SHORT_DELAY_MS * 1000L * 1000L)); |
365 |
|
}}); |
366 |
|
|
367 |
|
t.start(); |
418 |
|
sync.acquireInterruptibly(1); |
419 |
|
Thread t = new Thread(new InterruptedSyncRunnable(sync)); |
420 |
|
t.start(); |
421 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
422 |
|
t.interrupt(); |
423 |
|
assertTrue(sync.isHeldExclusively()); |
424 |
|
t.join(); |
806 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
807 |
|
public void realRun() throws InterruptedException { |
808 |
|
sync.acquire(1); |
809 |
< |
c.awaitNanos(1000 * 1000 * 1000); // 1 sec |
809 |
> |
c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L); |
810 |
|
}}); |
811 |
|
|
812 |
|
t.start(); |
954 |
|
Thread t = new Thread(new CheckedRunnable() { |
955 |
|
public void realRun() throws InterruptedException { |
956 |
|
threadAssertFalse(l.isSignalled()); |
957 |
< |
threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000)); |
957 |
> |
threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS * 1000L * 1000L)); |
958 |
|
threadAssertTrue(l.isSignalled()); |
959 |
|
}}); |
960 |
|
|
991 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
992 |
|
public void realRun() throws InterruptedException { |
993 |
|
threadAssertFalse(l.isSignalled()); |
994 |
< |
l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000); |
994 |
> |
l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L); |
995 |
|
}}); |
996 |
|
|
997 |
|
t.start(); |
1009 |
|
Thread t = new Thread(new CheckedRunnable() { |
1010 |
|
public void realRun() throws InterruptedException { |
1011 |
|
threadAssertFalse(l.isSignalled()); |
1012 |
< |
threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000)); |
1012 |
> |
threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000L * 1000L)); |
1013 |
|
}}); |
1014 |
|
|
1015 |
|
t.start(); |