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

Comparing jsr166/src/test/tck/LinkedBlockingDequeTest.java (file contents):
Revision 1.68 by jsr166, Sat Mar 25 21:41:10 2017 UTC vs.
Revision 1.69 by jsr166, Sat May 13 21:43:51 2017 UTC

# Line 689 | Line 689 | public class LinkedBlockingDequeTest ext
689          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
690          Thread t = newStartedThread(new CheckedRunnable() {
691              public void realRun() throws InterruptedException {
692 <                for (int i = 0; i < SIZE; ++i) {
693 <                    assertEquals(i, q.take());
694 <                }
692 >                for (int i = 0; i < SIZE; i++) assertEquals(i, q.take());
693  
694                  Thread.currentThread().interrupt();
695                  try {
# Line 709 | Line 707 | public class LinkedBlockingDequeTest ext
707              }});
708  
709          await(pleaseInterrupt);
710 <        assertThreadStaysAlive(t);
710 >        assertThreadBlocks(t, Thread.State.WAITING);
711          t.interrupt();
712          awaitTermination(t);
713      }
# Line 1001 | Line 999 | public class LinkedBlockingDequeTest ext
999          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
1000          Thread t = newStartedThread(new CheckedRunnable() {
1001              public void realRun() throws InterruptedException {
1002 <                for (int i = 0; i < SIZE; ++i) {
1005 <                    assertEquals(i, q.takeFirst());
1006 <                }
1002 >                for (int i = 0; i < SIZE; i++) assertEquals(i, q.takeFirst());
1003  
1004                  Thread.currentThread().interrupt();
1005                  try {
# Line 1021 | Line 1017 | public class LinkedBlockingDequeTest ext
1017              }});
1018  
1019          await(pleaseInterrupt);
1020 <        assertThreadStaysAlive(t);
1020 >        assertThreadBlocks(t, Thread.State.WAITING);
1021          t.interrupt();
1022          awaitTermination(t);
1023      }
# Line 1268 | Line 1264 | public class LinkedBlockingDequeTest ext
1264          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
1265          Thread t = newStartedThread(new CheckedRunnable() {
1266              public void realRun() throws InterruptedException {
1267 <                for (int i = 0; i < SIZE; ++i) {
1267 >                for (int i = 0; i < SIZE; i++)
1268                      assertEquals(SIZE - i - 1, q.takeLast());
1273                }
1269  
1270                  Thread.currentThread().interrupt();
1271                  try {
# Line 1288 | Line 1283 | public class LinkedBlockingDequeTest ext
1283              }});
1284  
1285          await(pleaseInterrupt);
1286 <        assertThreadStaysAlive(t);
1286 >        assertThreadBlocks(t, Thread.State.WAITING);
1287          t.interrupt();
1288          awaitTermination(t);
1289      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines