1396 |
|
|
1397 |
|
public void await(CountDownLatch latch) { |
1398 |
|
try { |
1399 |
< |
assertTrue(latch.await(LONG_DELAY_MS, MILLISECONDS)); |
1399 |
> |
if (!latch.await(LONG_DELAY_MS, MILLISECONDS)) |
1400 |
> |
fail("timed out waiting for CountDownLatch for " |
1401 |
> |
+ (LONG_DELAY_MS/1000) + " sec"); |
1402 |
|
} catch (Throwable fail) { |
1403 |
|
threadUnexpectedException(fail); |
1404 |
|
} |
1406 |
|
|
1407 |
|
public void await(Semaphore semaphore) { |
1408 |
|
try { |
1409 |
< |
assertTrue(semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)); |
1409 |
> |
if (!semaphore.tryAcquire(LONG_DELAY_MS, MILLISECONDS)) |
1410 |
> |
fail("timed out waiting for Semaphore for " |
1411 |
> |
+ (LONG_DELAY_MS/1000) + " sec"); |
1412 |
|
} catch (Throwable fail) { |
1413 |
|
threadUnexpectedException(fail); |
1414 |
|
} |