use of org.apache.openejb.threads.impl.ManagedScheduledExecutorServiceImpl in project tomee by apache.
the class ManagedScheduledExecutorServiceImplFactoryTest method createServiceTest.
@Test
public void createServiceTest() {
final ManagedScheduledExecutorServiceImplFactory factory = new ManagedScheduledExecutorServiceImplFactory();
factory.setThreadFactory(MyThreadFactory.class.getName());
final ManagedScheduledExecutorServiceImpl executorService = factory.create();
final ScheduledThreadPoolExecutor poolExecutor = (ScheduledThreadPoolExecutor) executorService.getDelegate();
Assert.assertEquals(poolExecutor.getThreadFactory().getClass(), ManagedThreadFactoryImpl.class);
}
Aggregations