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.24 by jsr166, Sun Nov 22 18:57:17 2009 UTC vs.
Revision 1.26 by jsr166, Wed Aug 25 00:07:03 2010 UTC

# Line 14 | Line 14 | import java.io.*;
14  
15   public class PriorityBlockingQueueTest extends JSR166TestCase {
16      public static void main(String[] args) {
17 <        junit.textui.TestRunner.run (suite());
17 >        junit.textui.TestRunner.run(suite());
18      }
19      public static Test suite() {
20          return new TestSuite(PriorityBlockingQueueTest.class);
# Line 663 | Line 663 | public class PriorityBlockingQueueTest e
663      /**
664       * iterator.remove removes current element
665       */
666 <    public void testIteratorRemove () {
666 >    public void testIteratorRemove() {
667          final PriorityBlockingQueue q = new PriorityBlockingQueue(3);
668          q.add(new Integer(2));
669          q.add(new Integer(1));
# Line 699 | Line 699 | public class PriorityBlockingQueueTest e
699          ExecutorService executor = Executors.newFixedThreadPool(2);
700          executor.execute(new CheckedRunnable() {
701              public void realRun() throws InterruptedException {
702 <                threadAssertNull(q.poll());
703 <                threadAssertTrue(null != q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
704 <                threadAssertTrue(q.isEmpty());
702 >                assertNull(q.poll());
703 >                assertSame(one, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
704 >                assertTrue(q.isEmpty());
705              }});
706  
707          executor.execute(new CheckedRunnable() {
708              public void realRun() throws InterruptedException {
709                  Thread.sleep(SMALL_DELAY_MS);
710 <                q.put(new Integer(1));
710 >                q.put(one);
711              }});
712  
713          joinPool(executor);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines