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.23 by jsr166, Sun Nov 22 18:57:17 2009 UTC vs.
Revision 1.24 by jsr166, Tue Dec 1 06:03:49 2009 UTC

# Line 757 | Line 757 | public class LinkedBlockingQueueTest ext
757          ExecutorService executor = Executors.newFixedThreadPool(2);
758          executor.execute(new CheckedRunnable() {
759              public void realRun() throws InterruptedException {
760 <                threadAssertFalse(q.offer(three));
761 <                threadAssertTrue(q.offer(three, MEDIUM_DELAY_MS, MILLISECONDS));
762 <                threadAssertEquals(0, q.remainingCapacity());
760 >                assertFalse(q.offer(three));
761 >                assertTrue(q.offer(three, MEDIUM_DELAY_MS, MILLISECONDS));
762 >                assertEquals(0, q.remainingCapacity());
763              }});
764  
765          executor.execute(new CheckedRunnable() {
766              public void realRun() throws InterruptedException {
767                  Thread.sleep(SMALL_DELAY_MS);
768 <                threadAssertEquals(one, q.take());
768 >                assertSame(one, q.take());
769              }});
770  
771          joinPool(executor);
# Line 779 | Line 779 | public class LinkedBlockingQueueTest ext
779          ExecutorService executor = Executors.newFixedThreadPool(2);
780          executor.execute(new CheckedRunnable() {
781              public void realRun() throws InterruptedException {
782 <                threadAssertNull(q.poll());
783 <                threadAssertTrue(null != q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
784 <                threadAssertTrue(q.isEmpty());
782 >                assertNull(q.poll());
783 >                assertSame(one, q.poll(MEDIUM_DELAY_MS, MILLISECONDS));
784 >                assertTrue(q.isEmpty());
785              }});
786  
787          executor.execute(new CheckedRunnable() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines