Skip to content

Commit

Permalink
Polish "Use milliseconds when configuring awaitTerminationPeriod"
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Jul 28, 2020
1 parent 685a611 commit ea5284c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ void awaitTerminationShouldApply() {
}

@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
Expand Down

0 comments on commit ea5284c

Please sign in to comment.