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

Comparing jsr166/src/test/tck/DelayQueueTest.java (file contents):
Revision 1.31 by jsr166, Wed Aug 25 00:07:03 2010 UTC vs.
Revision 1.34 by dl, Wed Sep 29 12:33:48 2010 UTC

# Line 284 | Line 284 | public class DelayQueueTest extends JSR1
284              shouldThrow();
285          } catch (NullPointerException success) {}
286      }
287 +
288      /**
289       * addAll of a collection with any null elements throws NPE after
290       * possibly adding some elements
# Line 491 | Line 492 | public class DelayQueueTest extends JSR1
492          final PDelay pdelay = new PDelay(0);
493          Thread t = new Thread(new CheckedRunnable() {
494              public void realRun() throws InterruptedException {
494                assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
495                assertSame(pdelay, q.poll(LONG_DELAY_MS, MILLISECONDS));
495                  try {
496 +                    assertNull(q.poll(SHORT_DELAY_MS, MILLISECONDS));
497 +                    assertSame(pdelay, q.poll(LONG_DELAY_MS, MILLISECONDS));
498                      q.poll(LONG_DELAY_MS, MILLISECONDS);
499                      shouldThrow();
500                  } catch (InterruptedException success) {}
# Line 787 | Line 788 | public class DelayQueueTest extends JSR1
788      public void testPeekDelayed() {
789          DelayQueue q = new DelayQueue();
790          q.add(new NanoDelay(Long.MAX_VALUE));
791 <        assert(q.peek() != null);
791 >        assertNotNull(q.peek());
792      }
793  
794  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines