use of org.springframework.boot.task.TaskExecutorCustomizer in project spring-boot by spring-projects.
the class TaskExecutionAutoConfigurationTests method taskExecutorBuilderShouldApplyCustomizer.
@Test
void taskExecutorBuilderShouldApplyCustomizer() {
this.contextRunner.withUserConfiguration(TaskExecutorCustomizerConfig.class).run((context) -> {
TaskExecutorCustomizer customizer = context.getBean(TaskExecutorCustomizer.class);
ThreadPoolTaskExecutor executor = context.getBean(TaskExecutorBuilder.class).build();
then(customizer).should().customize(executor);
});
}
Aggregations