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

Comparing jsr166/src/test/tck/LinkedTransferQueueTest.java (file contents):
Revision 1.70 by jsr166, Sat Feb 18 16:37:49 2017 UTC vs.
Revision 1.74 by jsr166, Sat May 13 22:49:01 2017 UTC

# Line 209 | Line 209 | public class LinkedTransferQueueTest ext
209          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
210          Thread t = newStartedThread(new CheckedRunnable() {
211              public void realRun() throws InterruptedException {
212 <                for (int i = 0; i < SIZE; ++i) {
213 <                    assertEquals(i, q.take());
214 <                }
212 >                for (int i = 0; i < SIZE; i++) assertEquals(i, q.take());
213  
214                  Thread.currentThread().interrupt();
215                  try {
# Line 229 | Line 227 | public class LinkedTransferQueueTest ext
227              }});
228  
229          await(pleaseInterrupt);
230 <        assertThreadStaysAlive(t);
230 >        assertThreadBlocks(t, Thread.State.WAITING);
231          t.interrupt();
232          awaitTermination(t);
233      }
# Line 294 | Line 292 | public class LinkedTransferQueueTest ext
292                  assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
293              }});
294  
295 <        aboutToWait.await();
296 <        waitForThreadToEnterWaitState(t);
295 >        await(aboutToWait);
296 >        assertThreadBlocks(t, Thread.State.TIMED_WAITING);
297          t.interrupt();
298          awaitTermination(t);
299          checkEmpty(q);
# Line 799 | Line 797 | public class LinkedTransferQueueTest ext
797          Thread first = newStartedThread(new CheckedRunnable() {
798              public void realRun() throws InterruptedException {
799                  q.transfer(four);
800 <                assertTrue(!q.contains(four));
800 >                assertFalse(q.contains(four));
801                  assertEquals(1, q.size());
802              }});
803  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines