--- jsr166/src/test/tck/ScheduledExecutorTest.java 2013/09/25 06:59:34 1.48 +++ jsr166/src/test/tck/ScheduledExecutorTest.java 2015/04/25 04:55:31 1.51 @@ -6,15 +6,30 @@ * Pat Fisher, Mike Judd. */ -import junit.framework.*; -import java.util.*; -import java.util.concurrent.*; import static java.util.concurrent.TimeUnit.MILLISECONDS; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Callable; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.atomic.AtomicInteger; +import junit.framework.Test; +import junit.framework.TestSuite; + public class ScheduledExecutorTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { return new TestSuite(ScheduledExecutorTest.class); @@ -146,7 +161,7 @@ public class ScheduledExecutorTest exten long startTime = System.nanoTime(); int cycles = 10; final CountDownLatch done = new CountDownLatch(cycles); - CheckedRunnable task = new CheckedRunnable() { + Runnable task = new CheckedRunnable() { public void realRun() { done.countDown(); }}; ScheduledFuture h = p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); @@ -174,7 +189,7 @@ public class ScheduledExecutorTest exten long startTime = System.nanoTime(); int cycles = 10; final CountDownLatch done = new CountDownLatch(cycles); - CheckedRunnable task = new CheckedRunnable() { + Runnable task = new CheckedRunnable() { public void realRun() { done.countDown(); }}; ScheduledFuture h = p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS);