676 |
|
|
677 |
|
pleaseInterrupt.countDown(); |
678 |
|
try { |
679 |
< |
q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS); |
679 |
> |
q.offer(new Object(), LONGER_DELAY_MS, MILLISECONDS); |
680 |
|
shouldThrow(); |
681 |
|
} catch (InterruptedException success) {} |
682 |
|
assertFalse(Thread.interrupted()); |
683 |
– |
|
684 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
683 |
|
}}); |
684 |
|
|
685 |
|
await(pleaseInterrupt); |
776 |
|
final CountDownLatch pleaseInterrupt = new CountDownLatch(1); |
777 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
778 |
|
public void realRun() throws InterruptedException { |
781 |
– |
long startTime = System.nanoTime(); |
779 |
|
for (int i = 0; i < SIZE; i++) |
780 |
|
assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); |
781 |
|
|
788 |
|
|
789 |
|
pleaseInterrupt.countDown(); |
790 |
|
try { |
791 |
< |
q.poll(LONG_DELAY_MS, MILLISECONDS); |
791 |
> |
q.poll(LONGER_DELAY_MS, MILLISECONDS); |
792 |
|
shouldThrow(); |
793 |
|
} catch (InterruptedException success) {} |
794 |
|
assertFalse(Thread.interrupted()); |
798 |
– |
|
799 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
795 |
|
}}); |
796 |
|
|
797 |
|
await(pleaseInterrupt); |
919 |
|
|
920 |
|
pleaseInterrupt.countDown(); |
921 |
|
try { |
922 |
< |
q.offerFirst(new Object(), LONG_DELAY_MS, MILLISECONDS); |
922 |
> |
q.offerFirst(new Object(), LONGER_DELAY_MS, MILLISECONDS); |
923 |
|
shouldThrow(); |
924 |
|
} catch (InterruptedException success) {} |
925 |
|
assertFalse(Thread.interrupted()); |
931 |
– |
|
932 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
926 |
|
}}); |
927 |
|
|
928 |
|
await(pleaseInterrupt); |
1090 |
|
final CountDownLatch pleaseInterrupt = new CountDownLatch(1); |
1091 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1092 |
|
public void realRun() throws InterruptedException { |
1100 |
– |
long startTime = System.nanoTime(); |
1093 |
|
for (int i = 0; i < SIZE; i++) |
1094 |
|
assertEquals(i, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); |
1095 |
|
|
1102 |
|
|
1103 |
|
pleaseInterrupt.countDown(); |
1104 |
|
try { |
1105 |
< |
q.pollFirst(LONG_DELAY_MS, MILLISECONDS); |
1105 |
> |
q.pollFirst(LONGER_DELAY_MS, MILLISECONDS); |
1106 |
|
shouldThrow(); |
1107 |
|
} catch (InterruptedException success) {} |
1108 |
|
assertFalse(Thread.interrupted()); |
1117 |
– |
|
1118 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
1109 |
|
}}); |
1110 |
|
|
1111 |
|
await(pleaseInterrupt); |
1281 |
|
|
1282 |
|
pleaseInterrupt.countDown(); |
1283 |
|
try { |
1284 |
< |
q.offerLast(new Object(), LONG_DELAY_MS, MILLISECONDS); |
1284 |
> |
q.offerLast(new Object(), LONGER_DELAY_MS, MILLISECONDS); |
1285 |
|
shouldThrow(); |
1286 |
|
} catch (InterruptedException success) {} |
1297 |
– |
|
1298 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
1287 |
|
}}); |
1288 |
|
|
1289 |
|
await(pleaseInterrupt); |
1370 |
|
final CountDownLatch pleaseInterrupt = new CountDownLatch(1); |
1371 |
|
Thread t = newStartedThread(new CheckedRunnable() { |
1372 |
|
public void realRun() throws InterruptedException { |
1385 |
– |
long startTime = System.nanoTime(); |
1373 |
|
for (int i = 0; i < SIZE; i++) |
1374 |
|
assertEquals(SIZE - i - 1, |
1375 |
|
q.pollLast(LONG_DELAY_MS, MILLISECONDS)); |
1383 |
|
|
1384 |
|
pleaseInterrupt.countDown(); |
1385 |
|
try { |
1386 |
< |
q.pollLast(LONG_DELAY_MS, MILLISECONDS); |
1386 |
> |
q.pollLast(LONGER_DELAY_MS, MILLISECONDS); |
1387 |
|
shouldThrow(); |
1388 |
|
} catch (InterruptedException success) {} |
1389 |
|
assertFalse(Thread.interrupted()); |
1403 |
– |
|
1404 |
– |
assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); |
1390 |
|
}}); |
1391 |
|
|
1392 |
|
await(pleaseInterrupt); |