270 |
|
}}); |
271 |
|
|
272 |
|
t.start(); |
273 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
274 |
|
t.interrupt(); |
275 |
|
t.join(); |
276 |
|
} |
371 |
|
lock.lockInterruptibly(); |
372 |
|
Thread t = new Thread(new InterruptedLockRunnable(lock)); |
373 |
|
t.start(); |
374 |
+ |
Thread.sleep(SHORT_DELAY_MS); |
375 |
|
t.interrupt(); |
376 |
|
assertTrue(lock.isLocked()); |
377 |
|
assertTrue(lock.isHeldByCurrentThread()); |
776 |
|
Thread t = new Thread(new CheckedInterruptedRunnable() { |
777 |
|
public void realRun() throws InterruptedException { |
778 |
|
lock.lock(); |
779 |
< |
c.awaitNanos(1000 * 1000 * 1000); // 1 sec |
779 |
> |
c.awaitNanos(LONG_DELAY_MS * 1000L * 1000L); |
780 |
|
}}); |
781 |
|
|
782 |
|
t.start(); |