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

Comparing jsr166/src/test/tck/PriorityBlockingQueueTest.java (file contents):
Revision 1.22 by jsr166, Sat Nov 21 22:00:46 2009 UTC vs.
Revision 1.23 by jsr166, Sun Nov 22 00:17:37 2009 UTC

# Line 372 | Line 372 | public class PriorityBlockingQueueTest e
372       * Take removes existing elements until empty, then blocks interruptibly
373       */
374      public void testBlockingTake() throws InterruptedException {
375 <        Thread t = new Thread(new CheckedInterruptedRunnable() {
375 >        final PriorityBlockingQueue q = populatedQueue(SIZE);
376 >        Thread t = new Thread(new CheckedRunnable() {
377              public void realRun() throws InterruptedException {
377                PriorityBlockingQueue q = populatedQueue(SIZE);
378                  for (int i = 0; i < SIZE; ++i) {
379 <                    threadAssertEquals(i, ((Integer)q.take()).intValue());
379 >                    assertEquals(i, q.take());
380                  }
381 <                q.take();
381 >                try {
382 >                    q.take();
383 >                    shouldThrow();
384 >                } catch (InterruptedException success) {}
385              }});
386  
387          t.start();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines