This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new ec9a084  CAMEL-13517: Fix camel-netty4-http TLS tests
ec9a084 is described below

commit ec9a084684e268850ff77eac8959644176ffde8e
Author: Zoran Regvart <[email protected]>
AuthorDate: Tue May 14 11:47:40 2019 +0200

    CAMEL-13517: Fix camel-netty4-http TLS tests
---
 .../camel/component/netty4/http/NettyHttpSSLTest.java  |   1 +
 .../component/netty4/http/SpringNettyHttpSSLTest.java  |  10 ++++++----
 .../src/test/resources/jsse/localhost.ks               | Bin 1265 -> 876 bytes
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpSSLTest.java
 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpSSLTest.java
index 6bcad67..540b66c 100644
--- 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpSSLTest.java
+++ 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpSSLTest.java
@@ -42,6 +42,7 @@ public class NettyHttpSSLTest extends BaseNettyTest {
         // use the server keystore as the trust store for these tests
         URL trustStoreUrl = 
this.getClass().getClassLoader().getResource("jsse/localhost.ks");
         setSystemProp("javax.net.ssl.trustStore", 
trustStoreUrl.toURI().getPath());
+        setSystemProp("javax.net.ssl.trustStorePassword", "changeit");
 
         super.setUp();
     }
diff --git 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/SpringNettyHttpSSLTest.java
 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/SpringNettyHttpSSLTest.java
index cf4c549..a4d1565 100644
--- 
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/SpringNettyHttpSSLTest.java
+++ 
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/SpringNettyHttpSSLTest.java
@@ -53,16 +53,18 @@ public class SpringNettyHttpSSLTest extends Assert {
     }
 
     @BeforeClass
-    public static void setUpJaas() throws Exception {
-        // ensure jsse clients can validate the self signed dummy localhost 
cert,
+    public static void setUpJSSE() throws Exception {
+        // ensure JSSE clients can validate the self signed dummy localhost 
cert,
         // use the server keystore as the trust store for these tests
         URL trustStoreUrl = 
NettyHttpSSLTest.class.getClassLoader().getResource("jsse/localhost.ks");
         System.setProperty("javax.net.ssl.trustStore", 
trustStoreUrl.toURI().getPath());
+        System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
     }
 
     @AfterClass
-    public static void tearDownJaas() throws Exception {
-        System.clearProperty("java.security.auth.login.config");
+    public static void tearDownJSSE() throws Exception {
+        System.clearProperty("javax.net.ssl.trustStore");
+        System.clearProperty("javax.net.ssl.trustStorePassword");
     }
 
     @Test
diff --git a/components/camel-netty4-http/src/test/resources/jsse/localhost.ks 
b/components/camel-netty4-http/src/test/resources/jsse/localhost.ks
index f285418..861b26f 100644
Binary files 
a/components/camel-netty4-http/src/test/resources/jsse/localhost.ks and 
b/components/camel-netty4-http/src/test/resources/jsse/localhost.ks differ

Reply via email to