460 |
|
barrier.await(); |
461 |
|
awaitTermination(t); |
462 |
|
assertFalse(lock.isLocked()); |
463 |
< |
} catch (Exception e) { |
464 |
< |
threadUnexpectedException(e); |
465 |
< |
} |
463 |
> |
} catch (Exception fail) { threadUnexpectedException(fail); } |
464 |
|
} |
465 |
|
|
466 |
|
/** |
472 |
|
final PublicReentrantLock lock = new PublicReentrantLock(fair); |
473 |
|
try { |
474 |
|
lock.lockInterruptibly(); |
475 |
< |
} catch (InterruptedException ie) { |
478 |
< |
threadUnexpectedException(ie); |
479 |
< |
} |
475 |
> |
} catch (InterruptedException fail) { threadUnexpectedException(fail); } |
476 |
|
assertLockedByMoi(lock); |
477 |
|
Thread t = newStartedThread(new InterruptedLockRunnable(lock)); |
478 |
|
waitForQueuedThread(lock, t); |
533 |
|
assertTrue(nanosRemaining <= 0); |
534 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis); |
535 |
|
lock.unlock(); |
536 |
< |
} catch (InterruptedException e) { |
541 |
< |
threadUnexpectedException(e); |
542 |
< |
} |
536 |
> |
} catch (InterruptedException fail) { threadUnexpectedException(fail); } |
537 |
|
} |
538 |
|
|
539 |
|
/** |
551 |
|
assertFalse(c.await(timeoutMillis, MILLISECONDS)); |
552 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis); |
553 |
|
lock.unlock(); |
554 |
< |
} catch (InterruptedException e) { |
561 |
< |
threadUnexpectedException(e); |
562 |
< |
} |
554 |
> |
} catch (InterruptedException fail) { threadUnexpectedException(fail); } |
555 |
|
} |
556 |
|
|
557 |
|
/** |
570 |
|
assertFalse(c.awaitUntil(new java.util.Date(d.getTime() + timeoutMillis))); |
571 |
|
assertTrue(millisElapsedSince(startTime) >= timeoutMillis); |
572 |
|
lock.unlock(); |
573 |
< |
} catch (InterruptedException e) { |
582 |
< |
threadUnexpectedException(e); |
583 |
< |
} |
573 |
> |
} catch (InterruptedException fail) { threadUnexpectedException(fail); } |
574 |
|
} |
575 |
|
|
576 |
|
/** |