Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 21627 invoked from network); 11 Jan 2010 17:10:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jan 2010 17:10:36 -0000 Received: (qmail 760 invoked by uid 500); 11 Jan 2010 17:10:36 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 683 invoked by uid 500); 11 Jan 2010 17:10:36 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 674 invoked by uid 99); 11 Jan 2010 17:10:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2010 17:10:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jan 2010 17:10:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5B41323889BB; Mon, 11 Jan 2010 17:10:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r897950 - in /cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11: WSSecurity111Test.java WSSecurity112Test.java WSSecurity11Common.java Date: Mon, 11 Jan 2010 17:10:12 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100111171012.5B41323889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Mon Jan 11 17:10:11 2010 New Revision: 897950 URL: http://svn.apache.org/viewvc?rev=897950&view=rev Log: [CXF-2613] Fix tests with IBM 1.6 JDK and restricted jars Patch from Eamonn Dwyer applied Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java?rev=897950&r1=897949&r2=897950&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity111Test.java Mon Jan 11 17:10:11 2010 @@ -46,6 +46,11 @@ launchServer(Server.class, true) ); } else { + if (WSSecurity11Common.isIBMJDK16()) { + System.out.println("Not running as there is a problem with 1.6 jdk and restricted jars"); + return; + } + assertTrue( "Server failed to launch", // run the server in the same process @@ -57,6 +62,11 @@ @Test public void testClientServer() { + if ((!unrestrictedPoliciesInstalled) + && (WSSecurity11Common.isIBMJDK16())) { + System.out.println("Not running as there is a problem with 1.6 jdk and restricted jars"); + return; + } String[] argv = new String[] { "A", "A-NoTimestamp", Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java?rev=897950&r1=897949&r2=897950&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity112Test.java Mon Jan 11 17:10:11 2010 @@ -47,6 +47,11 @@ launchServer(Server.class, true) ); } else { + if (WSSecurity11Common.isIBMJDK16()) { + System.out.println("Not running as there is a problem with 1.6 jdk and restricted jars"); + return; + } + assertTrue( "Server failed to launch", // run the server in the same process @@ -58,6 +63,12 @@ @Test public void testClientServer() { + if ((!unrestrictedPoliciesInstalled) + && (WSSecurity11Common.isIBMJDK16())) { + System.out.println("Not running as there is a problem with 1.6 jdk and restricted jars"); + return; + } + String[] argv = null; if (unrestrictedPoliciesInstalled) { argv = new String[] { Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java?rev=897950&r1=897949&r2=897950&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/WSSecurity11Common.java Mon Jan 11 17:10:11 2010 @@ -106,4 +106,28 @@ return unrestrictedPoliciesInstalled; } + public static boolean isIBMJDK16() { + String fullVersion = System.getProperty("java.fullversion"); + if (fullVersion == null) { + //Maybe one of the non IBM JDKs dont set this property, but + //the IBM one definitely does + return false; + } + if (fullVersion.indexOf("IBM") == -1) { + return false; + } + + String javaVersion = System.getProperty("java.version"); + double javaVersionNum = 0.0; + if (javaVersion.length() > 3) { + javaVersionNum = new Double(javaVersion.substring(0, 3)).doubleValue(); + } else { + javaVersionNum = new Double(javaVersion).doubleValue(); + } + if (javaVersionNum < 1.6) { + return false; + } + + return true; + } }