Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes e4dcd31e4 -> ccac433d0


Skipping some tests if Java 6 is used


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

Branch: refs/heads/3.0.x-fixes
Commit: ccac433d07f077f29f7878467edb589f8560a909
Parents: e4dcd31
Author: Sergey Beryozkin <[email protected]>
Authored: Wed Oct 28 13:43:11 2015 +0000
Committer: Sergey Beryozkin <[email protected]>
Committed: Wed Oct 28 13:43:11 2015 +0000

----------------------------------------------------------------------
 .../jaxrs/security/jwt/JweJwsAlgorithmTest.java |  4 ++-
 .../jaxrs/security/jwt/JweJwsReferenceTest.java | 29 +++++++++++++++-----
 2 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ccac433d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
----------------------------------------------------------------------
diff --git 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
index cb1f3b2..2742477 100644
--- 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
+++ 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsAlgorithmTest.java
@@ -169,7 +169,9 @@ public class JweJwsAlgorithmTest extends 
AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testWrongKeyEncryptionAlgorithmKeyIncluded() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsAlgorithmTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();

http://git-wip-us.apache.org/repos/asf/cxf/blob/ccac433d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java
----------------------------------------------------------------------
diff --git 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java
 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java
index 39cec16..e7f6857 100644
--- 
a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java
+++ 
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/jwt/JweJwsReferenceTest.java
@@ -36,6 +36,7 @@ import 
org.apache.cxf.rs.security.jose.jaxrs.JwsWriterInterceptor;
 import org.apache.cxf.systest.jaxrs.security.Book;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
+
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
@@ -44,7 +45,7 @@ import org.junit.BeforeClass;
  */
 public class JweJwsReferenceTest extends AbstractBusClientServerTestBase {
     public static final String PORT = BookServerReference.PORT;
-    
+    private static final Boolean SKIP_AES_GCM_TESTS = isJava6();
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", 
@@ -56,7 +57,10 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
         // Still need it for Oracle Java 7 and Java 8
         Security.addProvider(new BouncyCastleProvider());    
     }
-    
+    private static boolean isJava6() {
+        String version = System.getProperty("java.version");
+        return 1.6D == Double.parseDouble(version.substring(0, 3));    
+    }
     @AfterClass
     public static void unregisterBouncyCastleIfNeeded() throws Exception {
         Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);    
@@ -69,7 +73,9 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     @org.junit.Test
     @org.junit.Ignore
     public void testEncryptionIncludePublicKey() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -96,7 +102,9 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testEncryptionIncludeCert() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -134,7 +142,9 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testEncryptionIncludeCertNegativeTest() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -165,7 +175,9 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testEncryptionIncludeCertSha1() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -203,7 +215,9 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     
     @org.junit.Test
     public void testEncryptionIncludeCertSha1NegativeTest() throws Exception {
-
+        if (SKIP_AES_GCM_TESTS) {
+            return;
+        }
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();
@@ -275,6 +289,7 @@ public class JweJwsReferenceTest extends 
AbstractBusClientServerTestBase {
     @org.junit.Test
     public void testSignatureIncludeCertNegativeTest() throws Exception {
 
+        
         URL busFile = JweJwsReferenceTest.class.getResource("client.xml");
 
         List<Object> providers = new ArrayList<Object>();

Reply via email to