use of cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler in project today-framework by TAKETODAY.
the class SchedulerBeanDefinitionParserTests method threadNamePrefix.
@Test
public void threadNamePrefix() {
ThreadPoolTaskScheduler scheduler = (ThreadPoolTaskScheduler) this.context.getBean("customScheduler");
assertThat(scheduler.getThreadNamePrefix()).isEqualTo("customScheduler-");
}
use of cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler in project today-framework by TAKETODAY.
the class SchedulerBeanDefinitionParserTests method defaultScheduler.
@Test
public void defaultScheduler() {
ThreadPoolTaskScheduler scheduler = (ThreadPoolTaskScheduler) this.context.getBean("defaultScheduler");
Integer size = (Integer) new DirectFieldAccessor(scheduler).getPropertyValue("poolSize");
assertThat(size).isEqualTo(1);
}
use of cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler in project today-framework by TAKETODAY.
the class SchedulerBeanDefinitionParserTests method customScheduler.
@Test
public void customScheduler() {
ThreadPoolTaskScheduler scheduler = (ThreadPoolTaskScheduler) this.context.getBean("customScheduler");
Integer size = (Integer) new DirectFieldAccessor(scheduler).getPropertyValue("poolSize");
assertThat(size).isEqualTo(42);
}
use of cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler in project today-infrastructure by TAKETODAY.
the class SchedulerBeanDefinitionParserTests method customScheduler.
@Test
public void customScheduler() {
ThreadPoolTaskScheduler scheduler = (ThreadPoolTaskScheduler) this.context.getBean("customScheduler");
Integer size = (Integer) new DirectFieldAccessor(scheduler).getPropertyValue("poolSize");
assertThat(size).isEqualTo(42);
}
use of cn.taketoday.scheduling.concurrent.ThreadPoolTaskScheduler in project today-infrastructure by TAKETODAY.
the class SchedulerBeanDefinitionParserTests method threadNamePrefix.
@Test
public void threadNamePrefix() {
ThreadPoolTaskScheduler scheduler = (ThreadPoolTaskScheduler) this.context.getBean("customScheduler");
assertThat(scheduler.getThreadNamePrefix()).isEqualTo("customScheduler-");
}
Aggregations