summaryrefslogtreecommitdiffstats
path: root/jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java')
-rw-r--r--jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java b/jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java
index eced0ba..e988cc6 100644
--- a/jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java
+++ b/jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java
@@ -8,30 +8,40 @@
package jsr166;
-import junit.framework.*;
-import java.util.*;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorCompletionService;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.RunnableFuture;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.security.*;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
public class ExecutorCompletionServiceTest extends JSR166TestCase {
+ // android-note: Removed because the CTS runner does a bad job of
+ // retrying tests that have suite() declarations.
+ //
+ // public static void main(String[] args) {
+ // main(suite(), args);
+ // }
+ // public static Test suite() {
+ // return new TestSuite(...);
+ // }
/**
* Creating a new ECS with null Executor throw NPE
*/
public void testConstructorNPE() {
try {
- ExecutorCompletionService ecs = new ExecutorCompletionService(null);
+ new ExecutorCompletionService(null);
shouldThrow();
} catch (NullPointerException success) {}
}
@@ -42,7 +52,7 @@ public class ExecutorCompletionServiceTest extends JSR166TestCase {
public void testConstructorNPE2() {
try {
ExecutorService e = Executors.newCachedThreadPool();
- ExecutorCompletionService ecs = new ExecutorCompletionService(e, null);
+ new ExecutorCompletionService(e, null);
shouldThrow();
} catch (NullPointerException success) {}
}