257 |
|
pleaseOffer.countDown(); |
258 |
|
startTime = System.nanoTime(); |
259 |
|
assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); |
260 |
– |
assertTrue(millisElapsedSince(startTime) < MEDIUM_DELAY_MS); |
260 |
|
|
261 |
|
Thread.currentThread().interrupt(); |
262 |
|
try { |
271 |
|
shouldThrow(); |
272 |
|
} catch (InterruptedException success) {} |
273 |
|
assertFalse(Thread.interrupted()); |
274 |
+ |
|
275 |
+ |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
276 |
|
}}); |
277 |
|
|
278 |
|
await(pleaseOffer); |
279 |
|
long startTime = System.nanoTime(); |
280 |
|
try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); } |
281 |
|
catch (InterruptedException e) { threadUnexpectedException(e); } |
282 |
< |
assertTrue(millisElapsedSince(startTime) < MEDIUM_DELAY_MS); |
282 |
> |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
283 |
|
|
284 |
|
await(pleaseInterrupt); |
285 |
|
assertThreadStaysAlive(t); |