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

Comparing jsr166/src/test/tck/ScheduledExecutorTest.java (file contents):
Revision 1.48 by jsr166, Wed Sep 25 06:59:34 2013 UTC vs.
Revision 1.51 by jsr166, Sat Apr 25 04:55:31 2015 UTC

# Line 6 | Line 6
6   * Pat Fisher, Mike Judd.
7   */
8  
9 import junit.framework.*;
10 import java.util.*;
11 import java.util.concurrent.*;
9   import static java.util.concurrent.TimeUnit.MILLISECONDS;
10 +
11 + import java.util.ArrayList;
12 + import java.util.List;
13 + import java.util.concurrent.BlockingQueue;
14 + import java.util.concurrent.Callable;
15 + import java.util.concurrent.CountDownLatch;
16 + import java.util.concurrent.ExecutionException;
17 + import java.util.concurrent.Executors;
18 + import java.util.concurrent.ExecutorService;
19 + import java.util.concurrent.Future;
20 + import java.util.concurrent.RejectedExecutionException;
21 + import java.util.concurrent.ScheduledFuture;
22 + import java.util.concurrent.ScheduledThreadPoolExecutor;
23 + import java.util.concurrent.ThreadFactory;
24 + import java.util.concurrent.ThreadPoolExecutor;
25   import java.util.concurrent.atomic.AtomicInteger;
26  
27 + import junit.framework.Test;
28 + import junit.framework.TestSuite;
29 +
30   public class ScheduledExecutorTest extends JSR166TestCase {
31      public static void main(String[] args) {
32 <        junit.textui.TestRunner.run(suite());
32 >        main(suite(), args);
33      }
34      public static Test suite() {
35          return new TestSuite(ScheduledExecutorTest.class);
# Line 146 | Line 161 | public class ScheduledExecutorTest exten
161                  long startTime = System.nanoTime();
162                  int cycles = 10;
163                  final CountDownLatch done = new CountDownLatch(cycles);
164 <                CheckedRunnable task = new CheckedRunnable() {
164 >                Runnable task = new CheckedRunnable() {
165                      public void realRun() { done.countDown(); }};
166                  ScheduledFuture h =
167                      p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS);
# Line 174 | Line 189 | public class ScheduledExecutorTest exten
189                  long startTime = System.nanoTime();
190                  int cycles = 10;
191                  final CountDownLatch done = new CountDownLatch(cycles);
192 <                CheckedRunnable task = new CheckedRunnable() {
192 >                Runnable task = new CheckedRunnable() {
193                      public void realRun() { done.countDown(); }};
194                  ScheduledFuture h =
195                      p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines