327 |
|
}}); |
328 |
|
|
329 |
|
t.start(); |
330 |
< |
Thread.sleep(SHORT_DELAY_MS); |
330 |
> |
delay(SHORT_DELAY_MS); |
331 |
|
t.interrupt(); |
332 |
|
t.join(); |
333 |
|
assertEquals(SIZE, q.size()); |
351 |
|
}}); |
352 |
|
|
353 |
|
t.start(); |
354 |
< |
Thread.sleep(SHORT_DELAY_MS); |
354 |
> |
delay(SHORT_DELAY_MS); |
355 |
|
assertEquals(q.remainingCapacity(), 0); |
356 |
|
assertEquals(0, q.take()); |
357 |
< |
Thread.sleep(SHORT_DELAY_MS); |
357 |
> |
delay(SHORT_DELAY_MS); |
358 |
|
t.interrupt(); |
359 |
|
t.join(); |
360 |
|
assertEquals(q.remainingCapacity(), 0); |
377 |
|
}}); |
378 |
|
|
379 |
|
t.start(); |
380 |
< |
Thread.sleep(SHORT_DELAY_MS); |
380 |
> |
delay(SHORT_DELAY_MS); |
381 |
|
t.interrupt(); |
382 |
|
t.join(); |
383 |
|
} |
409 |
|
}}); |
410 |
|
|
411 |
|
t.start(); |
412 |
< |
Thread.sleep(SHORT_DELAY_MS); |
412 |
> |
delay(SHORT_DELAY_MS); |
413 |
|
t.interrupt(); |
414 |
|
t.join(); |
415 |
|
} |
752 |
|
|
753 |
|
executor.execute(new CheckedRunnable() { |
754 |
|
public void realRun() throws InterruptedException { |
755 |
< |
Thread.sleep(SMALL_DELAY_MS); |
755 |
> |
delay(SMALL_DELAY_MS); |
756 |
|
assertSame(one, q.take()); |
757 |
|
}}); |
758 |
|
|
774 |
|
|
775 |
|
executor.execute(new CheckedRunnable() { |
776 |
|
public void realRun() throws InterruptedException { |
777 |
< |
Thread.sleep(SMALL_DELAY_MS); |
777 |
> |
delay(SMALL_DELAY_MS); |
778 |
|
q.put(one); |
779 |
|
}}); |
780 |
|
|