Skip to content

Commit fb3d93c

Browse files
committed
Fix ClientHttpConnectorConfigurationTests.shouldApplyHttpClientMapper()
1 parent 07958ac commit fb3d93c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/function/client/ClientHttpConnectorConfigurationTests.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ void shouldApplyHttpClientMapper() {
7777
new ReactiveWebApplicationContextRunner()
7878
.withConfiguration(AutoConfigurations.of(ClientHttpConnectorConfiguration.ReactorNetty.class))
7979
.withUserConfiguration(CustomHttpClientMapper.class)
80-
.run((context) -> assertThat(CustomHttpClientMapper.called).isTrue());
80+
.run((context) -> {
81+
context.getBean("reactorClientHttpConnector");
82+
assertThat(CustomHttpClientMapper.called).isTrue();
83+
});
8184
}
8285

8386
static class CustomHttpClientMapper {
@@ -86,8 +89,10 @@ static class CustomHttpClientMapper {
8689

8790
@Bean
8891
ReactorNettyHttpClientMapper clientMapper() {
89-
called = true;
90-
return (client) -> client.baseUrl("/test");
92+
return (client) -> {
93+
called = true;
94+
return client.baseUrl("/test");
95+
};
9196
}
9297

9398
}

0 commit comments

Comments
 (0)