--- jsr166/src/test/tck/ArrayBlockingQueueTest.java 2009/11/21 17:38:05 1.20 +++ jsr166/src/test/tck/ArrayBlockingQueueTest.java 2009/11/21 19:11:53 1.21 @@ -448,17 +448,19 @@ public class ArrayBlockingQueueTest exte * returning timeout status */ public void testInterruptedTimedPoll() throws InterruptedException { - Thread t = new ThreadShouldThrow(InterruptedException.class) { + Thread t = new Thread(new CheckedRunnable() { public void realRun() throws InterruptedException { ArrayBlockingQueue q = populatedQueue(SIZE); for (int i = 0; i < SIZE; ++i) { - threadAssertEquals(i, ((Integer)q.poll(SHORT_DELAY_MS, MILLISECONDS)).intValue()); + assertEquals(i, ((Integer)q.poll(SHORT_DELAY_MS, MILLISECONDS)).intValue()); } - q.poll(MEDIUM_DELAY_MS, MILLISECONDS); - }}; + try { + q.poll(SMALL_DELAY_MS, MILLISECONDS); + } catch (InterruptedException success) {} + }}); t.start(); - Thread.sleep(SMALL_DELAY_MS); + Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); }