camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/6] git commit: Fixed test
Date Mon, 02 Dec 2013 08:20:34 GMT
Fixed test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a8dd0b5b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a8dd0b5b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a8dd0b5b

Branch: refs/heads/camel-2.11.x
Commit: a8dd0b5bbd6d1b500e5be126966c04e2a2e88266
Parents: 7fa3bb4
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Dec 2 09:16:04 2013 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Dec 2 09:22:29 2013 +0100

----------------------------------------------------------------------
 .../util/jsse/SSLContextParametersTest.java     | 51 ++++++++++++--------
 1 file changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a8dd0b5b/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
b/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
index 11c82b2..bc163c2 100644
--- a/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/jsse/SSLContextParametersTest.java
@@ -553,13 +553,16 @@ public class SSLContextParametersTest extends AbstractJsseParametersTest
{
         engine = context.createSSLEngine();
         socket = (SSLSocket) context.getSocketFactory().createSocket();
         serverSocket = (SSLServerSocket) context.getServerSocketFactory().createServerSocket();
-        
-        assertTrue(engine.getEnabledCipherSuites().length >= 1);
-        assertStartsWith(engine.getEnabledCipherSuites(), "TLS");
-        assertTrue(socket.getEnabledCipherSuites().length >= 1);
-        assertStartsWith(socket.getEnabledCipherSuites(), "TLS");
-        assertTrue(serverSocket.getEnabledCipherSuites().length >= 1);
-        assertStartsWith(serverSocket.getEnabledCipherSuites(), "TLS");
+
+        // not all platforms/JDKs have these cipher suites
+        if (!isPlatform("aix")) {
+            assertTrue(engine.getEnabledCipherSuites().length >= 1);
+            assertStartsWith(engine.getEnabledCipherSuites(), "TLS");
+            assertTrue(socket.getEnabledCipherSuites().length >= 1);
+            assertStartsWith(socket.getEnabledCipherSuites(), "TLS");
+            assertTrue(serverSocket.getEnabledCipherSuites().length >= 1);
+            assertStartsWith(serverSocket.getEnabledCipherSuites(), "TLS");
+        }
     }
 
     public void testSecureSocketProtocols() throws Exception {
@@ -619,13 +622,16 @@ public class SSLContextParametersTest extends AbstractJsseParametersTest
{
         engine = context.createSSLEngine();
         socket = (SSLSocket) context.getSocketFactory().createSocket();
         serverSocket = (SSLServerSocket) context.getServerSocketFactory().createServerSocket();
-        
-        assertEquals(1, engine.getEnabledProtocols().length);
-        assertEquals("TLSv1", engine.getEnabledProtocols()[0]);
-        assertEquals(1, socket.getEnabledProtocols().length);
-        assertEquals("TLSv1", socket.getEnabledProtocols()[0]);
-        assertEquals(1, socket.getEnabledProtocols().length);
-        assertEquals("TLSv1", serverSocket.getEnabledProtocols()[0]);        
+
+        // not all platforms/JDKs have these cipher suites
+        if (!isPlatform("aix")) {
+            assertEquals(1, engine.getEnabledProtocols().length);
+            assertEquals("TLSv1", engine.getEnabledProtocols()[0]);
+            assertEquals(1, socket.getEnabledProtocols().length);
+            assertEquals("TLSv1", socket.getEnabledProtocols()[0]);
+            assertEquals(1, socket.getEnabledProtocols().length);
+            assertEquals("TLSv1", serverSocket.getEnabledProtocols()[0]);
+        }
     }
     
     public void testSecureSocketProtocolsFilter() throws Exception {
@@ -692,13 +698,16 @@ public class SSLContextParametersTest extends AbstractJsseParametersTest
{
         engine = context.createSSLEngine();
         socket = (SSLSocket) context.getSocketFactory().createSocket();
         serverSocket = (SSLServerSocket) context.getServerSocketFactory().createServerSocket();
-        
-        assertTrue(engine.getEnabledProtocols().length >= 1);
-        assertStartsWith(engine.getEnabledProtocols(), "TLS");
-        assertTrue(socket.getEnabledProtocols().length >= 1);
-        assertStartsWith(socket.getEnabledProtocols(), "TLS");
-        assertTrue(socket.getEnabledProtocols().length >= 1);
-        assertStartsWith(serverSocket.getEnabledProtocols(), "TLS");        
+
+        // not all platforms/JDKs have these cipher suites
+        if (!isPlatform("aix")) {
+            assertTrue(engine.getEnabledProtocols().length >= 1);
+            assertStartsWith(engine.getEnabledProtocols(), "TLS");
+            assertTrue(socket.getEnabledProtocols().length >= 1);
+            assertStartsWith(socket.getEnabledProtocols(), "TLS");
+            assertTrue(socket.getEnabledProtocols().length >= 1);
+            assertStartsWith(serverSocket.getEnabledProtocols(), "TLS");
+        }
     }
     
     public void testSessionTimeout() throws Exception {


Mime
View raw message