mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish "Use milliseconds when configuring awaitTerminationPeriod"
See gh-22604
This commit is contained in:
parent
685a6116d1
commit
ea5284ca91
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -61,14 +61,10 @@ class TaskExecutorBuilderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void awaitTerminationPeriodShouldApply() {
|
||||
Duration period = Duration.ofMinutes(1);
|
||||
void awaitTerminationPeriodShouldApplyWithMillisecondPrecision() {
|
||||
Duration period = Duration.ofMillis(50);
|
||||
ThreadPoolTaskExecutor executor = this.builder.awaitTerminationPeriod(period).build();
|
||||
assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis());
|
||||
|
||||
period = Duration.ofMillis(50);
|
||||
executor = this.builder.awaitTerminationPeriod(period).build();
|
||||
assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user