test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java
changeset 58138 1e4270f875ee
parent 52730 345266000aba
equal deleted inserted replaced
58137:6a556bcd94fc 58138:1e4270f875ee
   664             new ScheduledThreadPoolExecutor(poolSize);
   664             new ScheduledThreadPoolExecutor(poolSize);
   665         final CountDownLatch threadsStarted = new CountDownLatch(poolSize);
   665         final CountDownLatch threadsStarted = new CountDownLatch(poolSize);
   666         Runnable waiter = new CheckedRunnable() { public void realRun() {
   666         Runnable waiter = new CheckedRunnable() { public void realRun() {
   667             threadsStarted.countDown();
   667             threadsStarted.countDown();
   668             try {
   668             try {
   669                 MILLISECONDS.sleep(2 * LONG_DELAY_MS);
   669                 MILLISECONDS.sleep(LONGER_DELAY_MS);
   670             } catch (InterruptedException success) {}
   670             } catch (InterruptedException success) {}
   671             ran.getAndIncrement();
   671             ran.getAndIncrement();
   672         }};
   672         }};
   673         for (int i = 0; i < count; i++)
   673         for (int i = 0; i < count; i++)
   674             p.execute(waiter);
   674             p.execute(waiter);