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

Comparing jsr166/src/test/tck/LinkedBlockingQueueTest.java (file contents):
Revision 1.18 by jsr166, Sat Nov 21 10:25:05 2009 UTC vs.
Revision 1.19 by jsr166, Sat Nov 21 19:11:53 2009 UTC

# Line 439 | Line 439 | public class LinkedBlockingQueueTest ext
439       * returning timeout status
440       */
441      public void testInterruptedTimedPoll() throws InterruptedException {
442 <        Thread t = new ThreadShouldThrow(InterruptedException.class) {
442 >        Thread t = new Thread(new CheckedRunnable() {
443              public void realRun() throws InterruptedException {
444                  LinkedBlockingQueue q = populatedQueue(SIZE);
445                  for (int i = 0; i < SIZE; ++i) {
446 <                    threadAssertEquals(i, ((Integer)q.poll(SHORT_DELAY_MS, MILLISECONDS)).intValue());
446 >                    assertEquals(i, ((Integer)q.poll(SHORT_DELAY_MS, MILLISECONDS)).intValue());
447                  }
448 <                q.poll(SMALL_DELAY_MS, MILLISECONDS);
449 <            }};
448 >                try {
449 >                    q.poll(SMALL_DELAY_MS, MILLISECONDS);
450 >                    shouldThrow();
451 >                } catch (InterruptedException success) {}
452 >            }});
453  
454          t.start();
455          Thread.sleep(SHORT_DELAY_MS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines