use of org.wildfly.swarm.config.undertow.server.HttpsListener in project wildfly-swarm by wildfly-swarm.
the class HTTP2CustomizerTest method testHTTP2Enabled.
@Test
public void testHTTP2Enabled() {
HTTP2Customizer customizer = new HTTP2Customizer();
customizer.undertow = new UndertowFraction().applyDefaults();
Server server = customizer.undertow.subresources().server(UndertowProperties.DEFAULT_SERVER);
AtomicReference<HttpsListener> listener = new AtomicReference<>();
server.httpsListener("default-https", (config) -> {
listener.set(config);
});
assertThat(listener.get()).isNotNull();
assertThat(listener.get().enableHttp2()).isNull();
customizer.customize();
assertThat(listener.get().enableHttp2()).isTrue();
}
Aggregations