Skip to content

Commit 64aac04

Browse files
committed
Merge pull request #21390 from izeye
* pr/21390: Fix ClientHttpConnectorConfigurationTests.shouldApplyHttpClientMapper() Closes gh-21390
2 parents deb2322 + 6022d4c commit 64aac04

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ private JettyClientHttpConnector getClientHttpConnector(JettyResourceFactory jet
7676
void shouldApplyHttpClientMapper() {
7777
new ReactiveWebApplicationContextRunner()
7878
.withConfiguration(AutoConfigurations.of(ClientHttpConnectorConfiguration.ReactorNetty.class))
79-
.withUserConfiguration(CustomHttpClientMapper.class)
80-
.run((context) -> assertThat(CustomHttpClientMapper.called).isTrue());
79+
.withUserConfiguration(CustomHttpClientMapper.class).run((context) -> {
80+
context.getBean("reactorClientHttpConnector");
81+
assertThat(CustomHttpClientMapper.called).isTrue();
82+
});
8183
}
8284

8385
static class CustomHttpClientMapper {
@@ -86,8 +88,10 @@ static class CustomHttpClientMapper {
8688

8789
@Bean
8890
ReactorNettyHttpClientMapper clientMapper() {
89-
called = true;
90-
return (client) -> client.baseUrl("/test");
91+
return (client) -> {
92+
called = true;
93+
return client.baseUrl("/test");
94+
};
9195
}
9296

9397
}

0 commit comments

Comments
 (0)