use of org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebServerFactory in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method deduceUseForwardHeaders.
@Test
void deduceUseForwardHeaders() {
this.environment.setProperty("DYNO", "-");
ConfigurableUndertowWebServerFactory factory = mock(ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(true);
}
use of org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebServerFactory in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method defaultUseForwardHeaders.
@Test
void defaultUseForwardHeaders() {
ConfigurableUndertowWebServerFactory factory = mock(ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
use of org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebServerFactory in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method customizeWorkerThreads.
@Test
void customizeWorkerThreads() {
bind("server.undertow.threads.worker=10");
ConfigurableUndertowWebServerFactory factory = mock(ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setWorkerThreads(10);
}
use of org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebServerFactory in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve.
@Test
void forwardHeadersWhenStrategyIsNoneShouldNotConfigureValve() {
this.environment.setProperty("DYNO", "-");
this.serverProperties.setForwardHeadersStrategy(ServerProperties.ForwardHeadersStrategy.NONE);
ConfigurableUndertowWebServerFactory factory = mock(ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setUseForwardHeaders(false);
}
use of org.springframework.boot.web.embedded.undertow.ConfigurableUndertowWebServerFactory in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method customizeIoThreads.
@Test
void customizeIoThreads() {
bind("server.undertow.threads.io=4");
ConfigurableUndertowWebServerFactory factory = mock(ConfigurableUndertowWebServerFactory.class);
this.customizer.customize(factory);
then(factory).should().setIoThreads(4);
}
Aggregations