public void thread1() { try { assertFalse(l.isSignalled()); l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000 * 1000); fail("should throw exception"); } catch (InterruptedException success) { assertTick(1); } }
public void thread1() throws InterruptedException { assertFalse(l.isSignalled()); assertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS * 1000 * 1000)); assertTick(1); }