This is an automated email from the ASF dual-hosted git repository. rsivaram pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new d76965e Fix SslTransportLayerTest.testUnsupportedCiphers to work with Java 11 (#5570) d76965e is described below commit d76965e38f6a66ab37c14014a2efea7816ab73cb Author: Ismael Juma <ism...@juma.me.uk> AuthorDate: Wed Aug 29 07:15:08 2018 -0700 Fix SslTransportLayerTest.testUnsupportedCiphers to work with Java 11 (#5570) Java 11 supports TLS 1.3 which has different cipher names than previous TLS versions so the simplistic way of choosing ciphers is not guaranteed to work. Fix it by configuring the context to use TLS 1.2. Reviewers: Rajini Sivaram <rajinisiva...@googlemail.com> --- .../java/org/apache/kafka/common/network/SslTransportLayerTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java b/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java index d70a448..919c167 100644 --- a/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java +++ b/clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java @@ -543,7 +543,9 @@ public class SslTransportLayerTest { @Test public void testUnsupportedCiphers() throws Exception { String node = "0"; - String[] cipherSuites = SSLContext.getDefault().getDefaultSSLParameters().getCipherSuites(); + SSLContext context = SSLContext.getInstance("TLSv1.2"); + context.init(null, null, null); + String[] cipherSuites = context.getDefaultSSLParameters().getCipherSuites(); sslServerConfigs.put(SslConfigs.SSL_CIPHER_SUITES_CONFIG, Arrays.asList(cipherSuites[0])); server = createEchoServer(SecurityProtocol.SSL);