# | 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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |