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.62 by jsr166, Tue Oct 6 00:03:55 2015 UTC vs.
Revision 1.65 by jsr166, Sun Oct 16 20:44:18 2016 UTC

# Line 48 | Line 48 | public class LinkedBlockingDequeTest ext
48  
49      /**
50       * Returns a new deque of given size containing consecutive
51 <     * Integers 0 ... n.
51 >     * Integers 0 ... n - 1.
52       */
53      private LinkedBlockingDeque<Integer> populatedDeque(int n) {
54          LinkedBlockingDeque<Integer> q =
# Line 59 | Line 59 | public class LinkedBlockingDequeTest ext
59          assertFalse(q.isEmpty());
60          assertEquals(0, q.remainingCapacity());
61          assertEquals(n, q.size());
62 +        assertEquals((Integer) 0, q.peekFirst());
63 +        assertEquals((Integer) (n - 1), q.peekLast());
64          return q;
65      }
66  
# Line 765 | Line 767 | public class LinkedBlockingDequeTest ext
767              }});
768  
769          aboutToWait.await();
770 <        waitForThreadToEnterWaitState(t, LONG_DELAY_MS);
770 >        waitForThreadToEnterWaitState(t);
771          t.interrupt();
772          awaitTermination(t);
773          checkEmpty(q);
# Line 1379 | Line 1381 | public class LinkedBlockingDequeTest ext
1381                      shouldThrow();
1382                  } catch (InterruptedException success) {}
1383                  assertFalse(Thread.interrupted());
1384 +
1385 +                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
1386              }});
1387  
1388          barrier.await();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines