13 |
|
import java.util.concurrent.CompletionService; |
14 |
|
import java.util.concurrent.CountDownLatch; |
15 |
|
import java.util.concurrent.ExecutionException; |
16 |
– |
import java.util.concurrent.Executor; |
16 |
|
import java.util.concurrent.ExecutorCompletionService; |
17 |
|
import java.util.concurrent.ExecutorService; |
18 |
|
import java.util.concurrent.Future; |
143 |
|
public void testPollReturnsNull() |
144 |
|
throws InterruptedException, ExecutionException { |
145 |
|
CompletionService cs = new ExecutorCompletionService(cachedThreadPool); |
146 |
< |
CountDownLatch proceed = new CountDownLatch(1); |
146 |
> |
final CountDownLatch proceed = new CountDownLatch(1); |
147 |
|
cs.submit(new Callable() { public String call() throws Exception { |
148 |
|
proceed.await(); |
149 |
|
return TEST_STRING; |