Skip to content

Commit bae1d8d

Browse files
committed
Polish "Use new AssertJ duration assertions"
See gh-19985
1 parent fac6f08 commit bae1d8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfigurationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ void shouldCustomizeTimeout() {
7474
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
7575
.withPropertyValues("spring.test.webtestclient.timeout=15m").run((context) -> {
7676
WebTestClient webTestClient = context.getBean(WebTestClient.class);
77-
Duration duration = (Duration) ReflectionTestUtils.getField(webTestClient, "timeout");
78-
assertThat(duration).hasMinutes(15);
77+
assertThat(webTestClient).hasFieldOrPropertyWithValue("timeout", Duration.ofMinutes(15));
7978
});
8079
}
8180

0 commit comments

Comments
 (0)