Fix ClientHttpConnectorConfigurationTests.shouldApplyHttpClientMapper()
See gh-21390
This commit is contained in:
parent
deb2322457
commit
6022d4cac7
|
|
@ -76,8 +76,10 @@ class ClientHttpConnectorConfigurationTests {
|
||||||
void shouldApplyHttpClientMapper() {
|
void shouldApplyHttpClientMapper() {
|
||||||
new ReactiveWebApplicationContextRunner()
|
new ReactiveWebApplicationContextRunner()
|
||||||
.withConfiguration(AutoConfigurations.of(ClientHttpConnectorConfiguration.ReactorNetty.class))
|
.withConfiguration(AutoConfigurations.of(ClientHttpConnectorConfiguration.ReactorNetty.class))
|
||||||
.withUserConfiguration(CustomHttpClientMapper.class)
|
.withUserConfiguration(CustomHttpClientMapper.class).run((context) -> {
|
||||||
.run((context) -> assertThat(CustomHttpClientMapper.called).isTrue());
|
context.getBean("reactorClientHttpConnector");
|
||||||
|
assertThat(CustomHttpClientMapper.called).isTrue();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static class CustomHttpClientMapper {
|
static class CustomHttpClientMapper {
|
||||||
|
|
@ -86,8 +88,10 @@ class ClientHttpConnectorConfigurationTests {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
ReactorNettyHttpClientMapper clientMapper() {
|
ReactorNettyHttpClientMapper clientMapper() {
|
||||||
called = true;
|
return (client) -> {
|
||||||
return (client) -> client.baseUrl("/test");
|
called = true;
|
||||||
|
return client.baseUrl("/test");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue