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.18 by jsr166, Sat Nov 21 09:28:16 2009 UTC vs.
Revision 1.21 by jsr166, Sat Nov 21 21:00:34 2009 UTC

# Line 58 | Line 58 | public class PriorityBlockingQueueTest e
58      }
59  
60      /**
61 <     * Constructor throws IAE if  capacity argument nonpositive
61 >     * Constructor throws IAE if capacity argument nonpositive
62       */
63      public void testConstructor2() {
64          try {
# Line 433 | Line 433 | public class PriorityBlockingQueueTest e
433                      assertEquals(i, ((Integer)q.poll(SHORT_DELAY_MS, MILLISECONDS)).intValue());
434                  }
435                  try {
436 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
436 >                    q.poll(SMALL_DELAY_MS, MILLISECONDS);
437                      shouldThrow();
438                  } catch (InterruptedException success) {}
439              }});
# Line 453 | Line 453 | public class PriorityBlockingQueueTest e
453          Thread t = new Thread(new CheckedRunnable() {
454              public void realRun() throws InterruptedException {
455                  assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
456 <                assertEquals(0, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
456 >                assertSame(zero, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
457                  try {
458                      q.poll(LONG_DELAY_MS, MILLISECONDS);
459 <                    threadShouldThrow();
459 >                    shouldThrow();
460                  } catch (InterruptedException success) {}
461              }});
462  
463          t.start();
464          Thread.sleep(SMALL_DELAY_MS);
465 <        assertTrue(q.offer(new Integer(0), SHORT_DELAY_MS, MILLISECONDS));
465 >        assertTrue(q.offer(zero, SHORT_DELAY_MS, MILLISECONDS));
466          t.interrupt();
467          t.join();
468      }
# Line 644 | Line 644 | public class PriorityBlockingQueueTest e
644              PriorityBlockingQueue q = populatedQueue(SIZE);
645              Object o[] = q.toArray(new String[10] );
646              shouldThrow();
647 <        } catch (ArrayStoreException  success) {}
647 >        } catch (ArrayStoreException success) {}
648      }
649  
650      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines