ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ArrayBlockingQueueTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ArrayBlockingQueueTest.java (file contents):
Revision 1.22 by jsr166, Sat Nov 21 19:48:24 2009 UTC vs.
Revision 1.23 by jsr166, Sat Nov 21 21:00:34 2009 UTC

# Line 472 | Line 472 | public class ArrayBlockingQueueTest exte
472       */
473      public void testTimedPollWithOffer() throws InterruptedException {
474          final ArrayBlockingQueue q = new ArrayBlockingQueue(2);
475 <        Thread t = new ThreadShouldThrow(InterruptedException.class) {
475 >        Thread t = new Thread(new CheckedRunnable() {
476              public void realRun() throws InterruptedException {
477 <                threadAssertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
478 <                q.poll(LONG_DELAY_MS, MILLISECONDS);
479 <                q.poll(LONG_DELAY_MS, MILLISECONDS);
480 <            }};
477 >                assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
478 >                assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS));
479 >                try {
480 >                    q.poll(LONG_DELAY_MS, MILLISECONDS);
481 >                    shouldThrow();
482 >                } catch (InterruptedException success) {}
483 >            }});
484  
485          t.start();
486          Thread.sleep(SMALL_DELAY_MS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines