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

Comparing jsr166/src/test/tck/CountDownLatchTest.java (file contents):
Revision 1.25 by jsr166, Sun May 14 01:37:52 2017 UTC vs.
Revision 1.27 by jsr166, Mon Aug 5 14:42:54 2019 UTC

# Line 22 | Line 22 | public class CountDownLatchTest extends
22      }
23  
24      /**
25 <     * negative constructor argument throws IAE
25 >     * negative constructor argument throws IllegalArgumentException
26       */
27      public void testConstructor() {
28          try {
# Line 173 | Line 173 | public class CountDownLatchTest extends
173          Thread t = newStartedThread(new CheckedRunnable() {
174              public void realRun() throws InterruptedException {
175                  assertEquals(1, l.getCount());
176 +
177 +                long startTime = System.nanoTime();
178                  assertFalse(l.await(timeoutMillis(), MILLISECONDS));
179 +                assertTrue(millisElapsedSince(startTime) >= timeoutMillis());
180 +
181                  assertEquals(1, l.getCount());
182              }});
183  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines