Skip to content

Commit b6b601d

Browse files
committed
Use localhost for hostname verification test
localhost is now part of the SAN of the generated server certificate, so the hostname verification succeeds. References #394 (cherry picked from commit f73b80a)
1 parent 02164d7 commit b6b601d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/rabbitmq/client/test/ssl/HostnameVerification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void hostnameVerificationSucceeds() throws Exception {
117117
connectionFactory.useSslProtocol(sslContext);
118118
customizer.accept(connectionFactory);
119119
try (Connection conn = connectionFactory.newConnection(
120-
() -> singletonList(new Address(Host.systemHostname(), ConnectionFactory.DEFAULT_AMQP_OVER_SSL_PORT)))) {
120+
() -> singletonList(new Address("localhost", ConnectionFactory.DEFAULT_AMQP_OVER_SSL_PORT)))) {
121121
assertTrue(conn.isOpen());
122122
}
123123
}

0 commit comments

Comments
 (0)