Fix compiler errors for 9b22097f7e7c878bd18c95d548ad36b5c9ae9e5c
Motivation: Branch 4.0 is broken as 9b22097f7e7c878bd18c95d548ad36b5c9ae9e5c uses 4.1 APIs in tests. Modifications: Fix the tests by using 4.0 APIs. Result: Branch 4.0 is back to green.
This commit is contained in:
parent
48ed70c1aa
commit
d0ae71f62c
@ -25,7 +25,6 @@ import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -79,17 +78,12 @@ public class DefaultPromiseTest {
|
||||
|
||||
@Test
|
||||
public void testNoStackOverflowErrorWithDefaultEventExecutorA() throws Exception {
|
||||
ExecutorService executorService = Executors.newSingleThreadExecutor();
|
||||
try {
|
||||
EventExecutor executor = new DefaultEventExecutor(executorService);
|
||||
EventExecutor executor = new DefaultEventExecutor(null, new DefaultThreadFactory("test"));
|
||||
try {
|
||||
testStackOverFlowErrorChainedFuturesA(Math.min(stackOverflowDepth << 1, Integer.MAX_VALUE), executor);
|
||||
} finally {
|
||||
executor.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
} finally {
|
||||
executorService.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -100,17 +94,12 @@ public class DefaultPromiseTest {
|
||||
|
||||
@Test
|
||||
public void testNoStackOverflowErrorWithDefaultEventExecutorB() throws Exception {
|
||||
ExecutorService executorService = Executors.newSingleThreadExecutor();
|
||||
try {
|
||||
EventExecutor executor = new DefaultEventExecutor(executorService);
|
||||
EventExecutor executor = new DefaultEventExecutor(null, new DefaultThreadFactory("test"));
|
||||
try {
|
||||
testStackOverFlowErrorChainedFuturesB(Math.min(stackOverflowDepth << 1, Integer.MAX_VALUE), executor);
|
||||
} finally {
|
||||
executor.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
} finally {
|
||||
executorService.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user