408 |
|
try { |
409 |
|
threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000)); |
410 |
|
} catch (Exception ex) { |
411 |
< |
threadUnexpectedException(); |
411 |
> |
threadUnexpectedException(ex); |
412 |
|
} |
413 |
|
} |
414 |
|
}); |
438 |
|
Thread.sleep(SMALL_DELAY_MS); |
439 |
|
} |
440 |
|
catch (Exception e) { |
441 |
< |
threadUnexpectedException(); |
441 |
> |
threadUnexpectedException(e); |
442 |
|
} |
443 |
|
sync.release(1); |
444 |
|
} |
604 |
|
sync.release(1); |
605 |
|
} |
606 |
|
catch (InterruptedException e) { |
607 |
< |
threadUnexpectedException(); |
607 |
> |
threadUnexpectedException(e); |
608 |
|
} |
609 |
|
} |
610 |
|
}); |
674 |
|
*/ |
675 |
|
public void testHasWaitersIAE() { |
676 |
|
final Mutex sync = new Mutex(); |
677 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
677 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
678 |
|
final Mutex sync2 = new Mutex(); |
679 |
|
try { |
680 |
|
sync2.hasWaiters(c); |
690 |
|
*/ |
691 |
|
public void testHasWaitersIMSE() { |
692 |
|
final Mutex sync = new Mutex(); |
693 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
693 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
694 |
|
try { |
695 |
|
sync.hasWaiters(c); |
696 |
|
shouldThrow(); |
706 |
|
*/ |
707 |
|
public void testGetWaitQueueLengthIAE() { |
708 |
|
final Mutex sync = new Mutex(); |
709 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
709 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
710 |
|
final Mutex sync2 = new Mutex(); |
711 |
|
try { |
712 |
|
sync2.getWaitQueueLength(c); |
722 |
|
*/ |
723 |
|
public void testGetWaitQueueLengthIMSE() { |
724 |
|
final Mutex sync = new Mutex(); |
725 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
725 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
726 |
|
try { |
727 |
|
sync.getWaitQueueLength(c); |
728 |
|
shouldThrow(); |
738 |
|
*/ |
739 |
|
public void testGetWaitingThreadsIAE() { |
740 |
|
final Mutex sync = new Mutex(); |
741 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
741 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
742 |
|
final Mutex sync2 = new Mutex(); |
743 |
|
try { |
744 |
|
sync2.getWaitingThreads(c); |
754 |
|
*/ |
755 |
|
public void testGetWaitingThreadsIMSE() { |
756 |
|
final Mutex sync = new Mutex(); |
757 |
< |
final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition()); |
757 |
> |
final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition(); |
758 |
|
try { |
759 |
|
sync.getWaitingThreads(c); |
760 |
|
shouldThrow(); |
782 |
|
sync.release(1); |
783 |
|
} |
784 |
|
catch (InterruptedException e) { |
785 |
< |
threadUnexpectedException(); |
785 |
> |
threadUnexpectedException(e); |
786 |
|
} |
787 |
|
} |
788 |
|
}); |
824 |
|
sync.release(1); |
825 |
|
} |
826 |
|
catch (InterruptedException e) { |
827 |
< |
threadUnexpectedException(); |
827 |
> |
threadUnexpectedException(e); |
828 |
|
} |
829 |
|
} |
830 |
|
}); |
839 |
|
sync.release(1); |
840 |
|
} |
841 |
|
catch (InterruptedException e) { |
842 |
< |
threadUnexpectedException(); |
842 |
> |
threadUnexpectedException(e); |
843 |
|
} |
844 |
|
} |
845 |
|
}); |
884 |
|
sync.release(1); |
885 |
|
} |
886 |
|
catch (InterruptedException e) { |
887 |
< |
threadUnexpectedException(); |
887 |
> |
threadUnexpectedException(e); |
888 |
|
} |
889 |
|
} |
890 |
|
}); |
898 |
|
sync.release(1); |
899 |
|
} |
900 |
|
catch (InterruptedException e) { |
901 |
< |
threadUnexpectedException(); |
901 |
> |
threadUnexpectedException(e); |
902 |
|
} |
903 |
|
} |
904 |
|
}); |