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.84 by jsr166, Sun Aug 11 22:29:27 2019 UTC vs.
Revision 1.86 by jsr166, Thu Sep 5 21:11:13 2019 UTC

# Line 676 | Line 676 | public class LinkedBlockingDequeTest ext
676  
677                  pleaseInterrupt.countDown();
678                  try {
679 <                    q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS);
679 >                    q.offer(new Object(), LONGER_DELAY_MS, MILLISECONDS);
680                      shouldThrow();
681                  } catch (InterruptedException success) {}
682                  assertFalse(Thread.interrupted());
683
684                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
683              }});
684  
685          await(pleaseInterrupt);
# Line 778 | Line 776 | public class LinkedBlockingDequeTest ext
776          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
777          Thread t = newStartedThread(new CheckedRunnable() {
778              public void realRun() throws InterruptedException {
781                long startTime = System.nanoTime();
779                  for (int i = 0; i < SIZE; i++)
780                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
781  
# Line 791 | Line 788 | public class LinkedBlockingDequeTest ext
788  
789                  pleaseInterrupt.countDown();
790                  try {
791 <                    q.poll(LONG_DELAY_MS, MILLISECONDS);
791 >                    q.poll(LONGER_DELAY_MS, MILLISECONDS);
792                      shouldThrow();
793                  } catch (InterruptedException success) {}
794                  assertFalse(Thread.interrupted());
798
799                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
795              }});
796  
797          await(pleaseInterrupt);
# Line 1097 | Line 1092 | public class LinkedBlockingDequeTest ext
1092          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
1093          Thread t = newStartedThread(new CheckedRunnable() {
1094              public void realRun() throws InterruptedException {
1100                long startTime = System.nanoTime();
1095                  for (int i = 0; i < SIZE; i++)
1096                      assertEquals(i, q.pollFirst(LONG_DELAY_MS, MILLISECONDS));
1097  
# Line 1110 | Line 1104 | public class LinkedBlockingDequeTest ext
1104  
1105                  pleaseInterrupt.countDown();
1106                  try {
1107 <                    q.pollFirst(LONG_DELAY_MS, MILLISECONDS);
1107 >                    q.pollFirst(LONGER_DELAY_MS, MILLISECONDS);
1108                      shouldThrow();
1109                  } catch (InterruptedException success) {}
1110                  assertFalse(Thread.interrupted());
1117
1118                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
1111              }});
1112  
1113          await(pleaseInterrupt);
# Line 1382 | Line 1374 | public class LinkedBlockingDequeTest ext
1374          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
1375          Thread t = newStartedThread(new CheckedRunnable() {
1376              public void realRun() throws InterruptedException {
1385                long startTime = System.nanoTime();
1377                  for (int i = 0; i < SIZE; i++)
1378                      assertEquals(SIZE - i - 1,
1379                                   q.pollLast(LONG_DELAY_MS, MILLISECONDS));
# Line 1396 | Line 1387 | public class LinkedBlockingDequeTest ext
1387  
1388                  pleaseInterrupt.countDown();
1389                  try {
1390 <                    q.pollLast(LONG_DELAY_MS, MILLISECONDS);
1390 >                    q.pollLast(LONGER_DELAY_MS, MILLISECONDS);
1391                      shouldThrow();
1392                  } catch (InterruptedException success) {}
1393                  assertFalse(Thread.interrupted());
1403
1404                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
1394              }});
1395  
1396          await(pleaseInterrupt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines