cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Fixing tests with JDK6
Date Thu, 05 Nov 2015 17:28:32 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 39b20262d -> b82a509d3


Fixing tests with JDK6


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

Branch: refs/heads/3.0.x-fixes
Commit: b82a509d3475292bd7655c62bfe198b624e6f424
Parents: 39b2026
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Nov 5 17:28:00 2015 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Nov 5 17:28:26 2015 +0000

----------------------------------------------------------------------
 .../security/jose/jwt/JWTAlgorithmTest.java     | 26 ++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b82a509d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt/JWTAlgorithmTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt/JWTAlgorithmTest.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt/JWTAlgorithmTest.java
index 4b66f35..f745e3d 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt/JWTAlgorithmTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jose/jwt/JWTAlgorithmTest.java
@@ -48,6 +48,12 @@ import org.junit.BeforeClass;
  */
 public class JWTAlgorithmTest extends AbstractBusClientServerTestBase {
     public static final String PORT = BookServerJwtAlgorithms.PORT;
+    private static final Boolean SKIP_AES_GCM_TESTS = isJava6();
+    
+    private static boolean isJava6() {
+        String version = System.getProperty("java.version");
+        return 1.6D == Double.parseDouble(version.substring(0, 3));    
+    }
     
     @BeforeClass
     public static void startServers() throws Exception {
@@ -72,6 +78,10 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testEncryptionProperties() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JWTAlgorithmTest.class.getResource("client.xml");
 
@@ -111,6 +121,10 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testEncryptionDynamic() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JWTAlgorithmTest.class.getResource("client.xml");
 
@@ -153,6 +167,10 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testWrongKeyEncryptionAlgorithm() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JWTAlgorithmTest.class.getResource("client.xml");
 
@@ -191,7 +209,7 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testWrongContentEncryptionAlgorithm() throws Exception {
-        if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
+        if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled())
{
             return;
         }
         
@@ -233,7 +251,7 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testBadEncryptingKey() throws Exception {
-        if (!SecurityTestUtil.checkUnrestrictedPoliciesInstalled()) {
+        if (SKIP_AES_GCM_TESTS || !SecurityTestUtil.checkUnrestrictedPoliciesInstalled())
{
             return;
         }
         
@@ -568,6 +586,10 @@ public class JWTAlgorithmTest extends AbstractBusClientServerTestBase
{
     
     @org.junit.Test
     public void testSignatureEncryptionProperties() throws Exception {
+        
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
 
         URL busFile = JWTAlgorithmTest.class.getResource("client.xml");
 


Mime
View raw message