use of com.rabbitmq.stream.impl.TestUtils.DisabledIfTlsNotEnabled in project rabbitmq-stream-java-client by rabbitmq.
the class StreamEnvironmentTest method environmentCreationShouldSucceedWhenUsingTls.
@DisabledIfTlsNotEnabled
@Test
void environmentCreationShouldSucceedWhenUsingTls() {
ChannelCustomizer channelCustomizer = ch -> {
SslHandler sslHandler = ch.pipeline().get(SslHandler.class);
if (sslHandler != null) {
SSLParameters sslParameters = sslHandler.engine().getSSLParameters();
sslParameters.setServerNames(Collections.singletonList(new SNIHostName("localhost")));
sslHandler.engine().setSSLParameters(sslParameters);
}
};
environmentBuilder.uri("rabbitmq-stream+tls://guest:guest@localhost:5551/%2f").channelCustomizer(channelCustomizer).tls().trustEverything().environmentBuilder().build().close();
}
Aggregations