use of org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory in project spring-boot by spring-projects.
the class NettyWebServerFactoryCustomizerTests method deduceUseForwardHeaders.
@Test
void deduceUseForwardHeaders() {
this.environment.setProperty("DYNO", "-");
NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory in project spring-boot by spring-projects.
the class NettyWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNativeShouldConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNativeShouldConfigureValve() {
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NATIVE);
NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory in project spring-boot by spring-projects.
the class NettyWebServerFactoryCustomizerTests method setMaxKeepAliveRequests.
@Test
void setMaxKeepAliveRequests() {
this.serverProperties.getNetty().setMaxKeepAliveRequests(100);
NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class);
this.customizer.customize(factory);
verifyMaxKeepAliveRequests(factory, 100);
}
use of org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory in project spring-boot by spring-projects.
the class NettyWebServerFactoryCustomizerTests method defaultUseForwardHeaders.
@Test
void defaultUseForwardHeaders() {
NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
use of org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory in project spring-boot by spring-projects.
the class NettyWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve() {
this.environment.setProperty("DYNO", "-");
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NONE);
NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
Aggregations