|
|
@ -61,14 +61,10 @@ class TaskExecutorBuilderTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
void awaitTerminationPeriodShouldApply() {
|
|
|
|
void awaitTerminationPeriodShouldApplyWithMillisecondPrecision() {
|
|
|
|
Duration period = Duration.ofMinutes(1);
|
|
|
|
Duration period = Duration.ofMillis(50);
|
|
|
|
ThreadPoolTaskExecutor executor = this.builder.awaitTerminationPeriod(period).build();
|
|
|
|
ThreadPoolTaskExecutor executor = this.builder.awaitTerminationPeriod(period).build();
|
|
|
|
assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis());
|
|
|
|
assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis());
|
|
|
|
|
|
|
|
|
|
|
|
period = Duration.ofMillis(50);
|
|
|
|
|
|
|
|
executor = this.builder.awaitTerminationPeriod(period).build();
|
|
|
|
|
|
|
|
assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|