diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-09-21 16:11:30 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-09-21 16:11:30 +0200 |
commit | 21b36d7313ff9f02c93f85964ba682e8bc5dd148 (patch) | |
tree | bf1c8e008d56588483567297d28269c2179d709a /container-core/src/test/java/com/yahoo | |
parent | 8df7e4f1fbbba3fcc065948f829b50dcc0f09217 (diff) |
Make ContainerThreadPool an interface
Diffstat (limited to 'container-core/src/test/java/com/yahoo')
-rw-r--r-- | container-core/src/test/java/com/yahoo/container/handler/threadpool/DefaultContainerThreadPoolTest.java (renamed from container-core/src/test/java/com/yahoo/container/handler/threadpool/ContainerThreadPoolTest.java) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/handler/threadpool/ContainerThreadPoolTest.java b/container-core/src/test/java/com/yahoo/container/handler/threadpool/DefaultContainerThreadPoolTest.java index 02e791099ed..8b1ed12c796 100644 --- a/container-core/src/test/java/com/yahoo/container/handler/threadpool/ContainerThreadPoolTest.java +++ b/container-core/src/test/java/com/yahoo/container/handler/threadpool/DefaultContainerThreadPoolTest.java @@ -20,11 +20,11 @@ import static org.junit.Assert.fail; * @author Steinar Knutsen * @author bjorncs */ -public class ContainerThreadPoolTest { +public class DefaultContainerThreadPoolTest { @Test public final void testThreadPool() throws InterruptedException { ContainerThreadpoolConfig config = new ContainerThreadpoolConfig(new ContainerThreadpoolConfig.Builder().maxThreads(1)); - ContainerThreadPool threadPool = new ContainerThreadPool(config, Mockito.mock(Metric.class)); + ContainerThreadPool threadPool = new DefaultContainerThreadpool(config, Mockito.mock(Metric.class)); Executor exec = threadPool.executor(); Tuple2<Receiver.MessageState, Boolean> reply; FlipIt command = new FlipIt(); @@ -56,7 +56,7 @@ public class ContainerThreadPoolTest { private ThreadPoolExecutor createPool(int maxThreads, int queueSize) { ContainerThreadpoolConfig config = new ContainerThreadpoolConfig(new ContainerThreadpoolConfig.Builder().maxThreads(maxThreads).queueSize(queueSize)); - ContainerThreadPool threadPool = new ContainerThreadPool(config, Mockito.mock(Metric.class)); + ContainerThreadPool threadPool = new DefaultContainerThreadpool(config, Mockito.mock(Metric.class)); ExecutorServiceWrapper wrapper = (ExecutorServiceWrapper) threadPool.executor(); WorkerCompletionTimingThreadPoolExecutor executor = (WorkerCompletionTimingThreadPoolExecutor)wrapper.delegate(); return executor; @@ -104,7 +104,7 @@ public class ContainerThreadPoolTest { .maxThreads(2) .maxThreadExecutionTimeSeconds(1)); MockProcessTerminator terminator = new MockProcessTerminator(); - ContainerThreadPool threadPool = new ContainerThreadPool(config, Mockito.mock(Metric.class), terminator); + ContainerThreadPool threadPool = new DefaultContainerThreadpool(config, Mockito.mock(Metric.class), terminator); // No dying when threads hang shorter than max thread execution time threadPool.executor().execute(new Hang(500)); |