Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ pipeline {
}
}

stage('JDK 15 and Scala 2.13') {
stage('JDK 16 and Scala 2.13') {
agent { label 'ubuntu' }
tools {
jdk 'jdk_15_latest'
jdk 'jdk_16_latest'
}
options {
timeout(time: 8, unit: 'HOURS')
Expand All @@ -157,7 +157,7 @@ pipeline {
steps {
doValidation()
doTest(env)
echo 'Skipping Kafka Streams archetype test for Java 15'
echo 'Skipping Kafka Streams archetype test for Java 16'
}
}

Expand Down Expand Up @@ -231,14 +231,14 @@ pipeline {
}
}

stage('JDK 15 and Scala 2.12') {
stage('JDK 16 and Scala 2.12') {
when {
not { changeRequest() }
beforeAgent true
}
agent { label 'ubuntu' }
tools {
jdk 'jdk_15_latest'
jdk 'jdk_16_latest'
}
options {
timeout(time: 8, unit: 'HOURS')
Expand All @@ -250,7 +250,7 @@ pipeline {
steps {
doValidation()
doTest(env)
echo 'Skipping Kafka Streams archetype test for Java 15'
echo 'Skipping Kafka Streams archetype test for Java 16'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ void pollSelectionKeys(Set<SelectionKey> selectionKeys,
} catch (Exception e) {
String desc = channel.socketDescription();
if (e instanceof IOException) {
log.debug("Connection with {} disconnected", desc, e);
log.error("Connection with {} disconnected", desc, e);
} else if (e instanceof AuthenticationException) {
boolean isReauthentication = channel.successfulAuthentications() > 0;
if (isReauthentication)
Expand All @@ -613,10 +613,10 @@ void pollSelectionKeys(Set<SelectionKey> selectionKeys,
String exceptionMessage = e.getMessage();
if (e instanceof DelayedResponseAuthenticationException)
exceptionMessage = e.getCause().getMessage();
log.info("Failed {}authentication with {} ({})", isReauthentication ? "re-" : "",
log.error("Failed {}authentication with {} ({})", isReauthentication ? "re-" : "",
desc, exceptionMessage);
} else {
log.warn("Unexpected error from {}; closing connection", desc, e);
log.error("Unexpected error from {}; closing connection", desc, e);
}

if (e instanceof DelayedResponseAuthenticationException)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
import org.apache.kafka.common.security.auth.SecurityProtocol;
import org.apache.kafka.common.security.ssl.DefaultSslEngineFactory;
import org.apache.kafka.common.security.ssl.SslFactory;
import org.apache.kafka.common.utils.Java;
//import org.apache.kafka.common.utils.Java;
import org.apache.kafka.common.utils.LogContext;
import org.apache.kafka.common.utils.Time;
import org.apache.kafka.common.utils.Utils;
import org.apache.kafka.test.TestSslUtils;
import org.apache.kafka.test.TestUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand Down Expand Up @@ -128,10 +130,11 @@ private static class SslTransportLayerArgumentsProvider implements ArgumentsProv
public Stream<? extends Arguments> provideArguments(ExtensionContext context) throws Exception {
List<Arguments> parameters = new ArrayList<>();
parameters.add(Arguments.of(new Args("TLSv1.2", false)));
parameters.add(Arguments.of(new Args("TLSv1.2", true)));
if (Java.IS_JAVA11_COMPATIBLE) {
parameters.add(Arguments.of(new Args("TLSv1.3", false)));
}
// Disable temporarily to make debugging easier
// parameters.add(Arguments.of(new Args("TLSv1.2", true)));
// if (Java.IS_JAVA11_COMPATIBLE) {
// parameters.add(Arguments.of(new Args("TLSv1.3", false)));
// }
return parameters.stream();
}
}
Expand Down Expand Up @@ -591,7 +594,7 @@ public void testInvalidKeyPassword(Args args) throws Exception {
}

/**
* Tests that connection success with the default TLS version.
* Tests that connection succeeds with the default TLS version.
*/
@ParameterizedTest
@ArgumentsSource(SslTransportLayerArgumentsProvider.class)
Expand All @@ -611,12 +614,6 @@ public void testTlsDefaults(Args args) throws Exception {
NetworkTestUtils.checkClientConnection(selector, "0", 10, 100);
server.verifyAuthenticationMetrics(1, 0);
selector.close();

checkAuthenticationFailed(args, "1", "TLSv1.1");
server.verifyAuthenticationMetrics(1, 1);

checkAuthenticationFailed(args, "2", "TLSv1");
server.verifyAuthenticationMetrics(1, 2);
}

/** Checks connection failed using the specified {@code tlsVersion}. */
Expand All @@ -636,12 +633,14 @@ private void checkAuthenticationFailed(Args args, String node, String tlsVersion
*/
@ParameterizedTest
@ArgumentsSource(SslTransportLayerArgumentsProvider.class)
public void testUnsupportedTLSVersion(Args args) throws Exception {
args.sslServerConfigs.put(SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG, Arrays.asList("TLSv1.2"));
public void testUnsupportedTlsVersion(Args args) throws Exception {
server = createEchoServer(args, SecurityProtocol.SSL);

checkAuthenticationFailed(args, "0", "TLSv1.1");
server.verifyAuthenticationMetrics(0, 1);

checkAuthenticationFailed(args, "0", "TLSv1");
server.verifyAuthenticationMetrics(0, 2);
}

/**
Expand Down