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.28 by jsr166, Sun Aug 11 22:29:26 2019 UTC vs.
Revision 1.29 by jsr166, Thu Sep 5 21:33:55 2019 UTC

# Line 144 | Line 144 | public class CountDownLatchTest extends
144          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
145          Thread t = newStartedThread(new CheckedRunnable() {
146              public void realRun() throws InterruptedException {
147                long startTime = System.nanoTime();
148
147                  Thread.currentThread().interrupt();
148                  try {
149                      l.await(randomTimeout(), randomTimeUnit());
# Line 155 | Line 153 | public class CountDownLatchTest extends
153  
154                  pleaseInterrupt.countDown();
155                  try {
156 <                    l.await(LONG_DELAY_MS, MILLISECONDS);
156 >                    l.await(LONGER_DELAY_MS, MILLISECONDS);
157                      shouldThrow();
158                  } catch (InterruptedException success) {}
159                  assertFalse(Thread.interrupted());
160  
161                  assertEquals(initialCount, l.getCount());
164                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
162              }});
163  
164          await(pleaseInterrupt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines