use of org.apache.tika.config.DummyExecutor in project tika by apache.
the class TikaConfigTest method testTikaExecutorServiceFromConfig.
@Test
public void testTikaExecutorServiceFromConfig() throws Exception {
URL url = TikaConfigTest.class.getResource("TIKA-1762-executors.xml");
TikaConfig config = new TikaConfig(url);
ThreadPoolExecutor executorService = (ThreadPoolExecutor) config.getExecutorService();
assertTrue("Should use Dummy Executor", (executorService instanceof DummyExecutor));
assertEquals("Should have configured Core Threads", 3, executorService.getCorePoolSize());
assertEquals("Should have configured Max Threads", 10, executorService.getMaximumPoolSize());
}
Aggregations