You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/14 16:19:48 UTC
[camel] branch main updated: CAMEL-16141 Investigate failing mina tests on JDK >= 11 (#6538)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 525773c CAMEL-16141 Investigate failing mina tests on JDK >= 11 (#6538)
525773c is described below
commit 525773c5fb9b4008b9db9b755d4700271f8de0aa
Author: JiriOndrusek <on...@gmail.com>
AuthorDate: Tue Dec 14 17:17:28 2021 +0100
CAMEL-16141 Investigate failing mina tests on JDK >= 11 (#6538)
---
.../java/org/apache/camel/component/mina/BaseMinaTest.java | 10 ++++++++++
.../camel/component/mina/MinaSslContextParametersTcpTest.java | 4 ----
.../component/mina/MinaSslGlobalContextParametersTcpTest.java | 4 ----
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/components/camel-mina/src/test/java/org/apache/camel/component/mina/BaseMinaTest.java b/components/camel-mina/src/test/java/org/apache/camel/component/mina/BaseMinaTest.java
index 0baf33f..e8ea673 100644
--- a/components/camel-mina/src/test/java/org/apache/camel/component/mina/BaseMinaTest.java
+++ b/components/camel-mina/src/test/java/org/apache/camel/component/mina/BaseMinaTest.java
@@ -16,12 +16,15 @@
*/
package org.apache.camel.component.mina;
+import java.util.Collections;
+
import org.apache.camel.BindToRegistry;
import org.apache.camel.support.jsse.ClientAuthentication;
import org.apache.camel.support.jsse.KeyManagersParameters;
import org.apache.camel.support.jsse.KeyStoreParameters;
import org.apache.camel.support.jsse.SSLContextParameters;
import org.apache.camel.support.jsse.SSLContextServerParameters;
+import org.apache.camel.support.jsse.SecureSocketProtocolsParameters;
import org.apache.camel.support.jsse.TrustManagersParameters;
import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -71,6 +74,13 @@ public abstract class BaseMinaTest extends CamelTestSupport {
scsp.setClientAuthentication(ClientAuthentication.WANT.name());
SSLContextParameters sslContextParameters = new SSLContextParameters();
+
+ //with tls 1.3 there are random failures, 1.2 is used instead
+ //(see https://issues.apache.org/jira/browse/DIRMINA-1132)
+ SecureSocketProtocolsParameters secureSocketProtocols = new SecureSocketProtocolsParameters();
+ secureSocketProtocols.setSecureSocketProtocol(Collections.singletonList("TLSv1.2"));
+ sslContextParameters.setSecureSocketProtocols(secureSocketProtocols);
+
sslContextParameters.setKeyManagers(kmp);
sslContextParameters.setTrustManagers(tmp);
sslContextParameters.setServerParameters(scsp);
diff --git a/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslContextParametersTcpTest.java b/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslContextParametersTcpTest.java
index adb0c26..46ea8a0 100644
--- a/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslContextParametersTcpTest.java
+++ b/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslContextParametersTcpTest.java
@@ -19,14 +19,10 @@ package org.apache.camel.component.mina;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.EnabledOnJre;
-
-import static org.junit.jupiter.api.condition.JRE.JAVA_8;
public class MinaSslContextParametersTcpTest extends BaseMinaTest {
@Test
- @EnabledOnJre(value = { JAVA_8 }, disabledReason = "TODO: investigate why it fails on JDK > 8")
public void testMinaRoute() throws Exception {
MockEndpoint endpoint = getMockEndpoint("mock:result");
Object body = "Hello there!";
diff --git a/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslGlobalContextParametersTcpTest.java b/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslGlobalContextParametersTcpTest.java
index 74c736b..8daa9d6 100644
--- a/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslGlobalContextParametersTcpTest.java
+++ b/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaSslGlobalContextParametersTcpTest.java
@@ -21,9 +21,6 @@ import org.apache.camel.SSLContextParametersAware;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.EnabledOnJre;
-
-import static org.junit.jupiter.api.condition.JRE.JAVA_8;
public class MinaSslGlobalContextParametersTcpTest extends BaseMinaTest {
@@ -36,7 +33,6 @@ public class MinaSslGlobalContextParametersTcpTest extends BaseMinaTest {
}
@Test
- @EnabledOnJre(value = { JAVA_8 }, disabledReason = "TODO: investigate why it fails on JDK > 8")
public void testMinaRoute() throws Exception {
MockEndpoint endpoint = getMockEndpoint("mock:result");
Object body = "Hello there!";