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

Comparing jsr166/src/test/tck/ExecutorsTest.java (file contents):
Revision 1.51 by jsr166, Mon Dec 16 22:55:54 2019 UTC vs.
Revision 1.54 by jsr166, Sat Feb 1 18:52:17 2020 UTC

# Line 279 | Line 279 | public class ExecutorsTest extends JSR16
279              Executors.newScheduledThreadPool(2),
280          };
281  
282 <        final Runnable sleeper = new CheckedInterruptedRunnable() {
282 >        final CountDownLatch done = new CountDownLatch(1);
283 >
284 >        final Runnable sleeper = new CheckedRunnable() {
285              public void realRun() throws InterruptedException {
286 <                delay(LONG_DELAY_MS);
286 >                done.await(LONG_DELAY_MS, MILLISECONDS);
287              }};
288  
289          List<Thread> threads = new ArrayList<>();
# Line 294 | Line 296 | public class ExecutorsTest extends JSR16
296          }
297          for (Thread thread : threads)
298              awaitTermination(thread);
299 +        done.countDown();
300          for (ExecutorService executor : executors)
301              joinPool(executor);
302      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines