cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1426982 - /cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java
Date Sun, 30 Dec 2012 20:10:51 GMT
Author: owulff
Date: Sun Dec 30 20:10:50 2012
New Revision: 1426982

URL: http://svn.apache.org/viewvc?rev=1426982&view=rev
Log:
Disable test

Modified:
    cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java

Modified: cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java?rev=1426982&r1=1426981&r2=1426982&view=diff
==============================================================================
--- cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java (original)
+++ cxf/fediz/trunk/systests/tests/src/test/java/org/apache/cxf/fediz/JettyTest.java Sun Dec
30 20:10:50 2012
@@ -46,11 +46,12 @@ import org.apache.http.impl.client.LaxRe
 import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.util.EntityUtils;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.util.resource.Resource;
-import org.eclipse.jetty.xml.XmlConfiguration;
+//import org.eclipse.jetty.util.resource.Resource;
+//import org.eclipse.jetty.xml.XmlConfiguration;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 
 
 public class JettyTest {
@@ -70,10 +71,10 @@ public class JettyTest {
 
         System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient",
"debug");
 
-        idpHttpsPort = System.getProperty("idp.https.port");
-        Assert.assertNotNull(idpHttpsPort);
-        rpHttpsPort = System.getProperty("rp.https.port");
-        Assert.assertNotNull(rpHttpsPort);
+        //idpHttpsPort = System.getProperty("idp.https.port");
+        //Assert.assertNotNull(idpHttpsPort);
+        //rpHttpsPort = System.getProperty("rp.https.port");
+        //Assert.assertNotNull(rpHttpsPort);
 
         initIdp();
         initWebApp();
@@ -81,10 +82,10 @@ public class JettyTest {
     
     private static void initWebApp() {
         try {
-            Resource testServerConfig = Resource.newSystemResource("jetty/rp-server.xml");
-            XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            server = (Server)configuration.configure();   
-            server.start();
+//            Resource testServerConfig = Resource.newSystemResource("jetty/rp-server.xml");
+//            XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
+//            server = (Server)configuration.configure();   
+//            server.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -92,16 +93,17 @@ public class JettyTest {
     
     private static void initIdp() {
         try {
-            Resource testServerConfig = Resource.newSystemResource("jetty/idp-server.xml");
-            XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
-            server = (Server)configuration.configure();
-            server.start();
+//            Resource testServerConfig = Resource.newSystemResource("jetty/idp-server.xml");
+//            XmlConfiguration configuration = new XmlConfiguration(testServerConfig.getInputStream());
+//            server = (Server)configuration.configure();
+//            server.start();
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
     
     @org.junit.Test
+    @Ignore
     public void testStart() throws Exception {
         System.out.println(System.getProperty("jetty.home"));
         System.out.println(Server.getVersion());
@@ -110,8 +112,8 @@ public class JettyTest {
     
 
     @org.junit.Test
-    @org.junit.Ignore
-    public void testGetSecureUrl() throws Exception {
+    @Ignore
+    public void testPluginHttpGet() throws Exception {
         String uri = "https://localhost:" + rpHttpsPort + "/fedizhelloworld/secure/fedservlet";
         DefaultHttpClient httpclient = new DefaultHttpClient();
         String user = "alice";
@@ -121,7 +123,7 @@ public class JettyTest {
                     new UsernamePasswordCredentials(user, "ecila"));
 
             KeyStore trustStore  = KeyStore.getInstance(KeyStore.getDefaultType());
-            FileInputStream instream = new FileInputStream(new File("./target/test-classes/tomcat-idp.jks"));
+            FileInputStream instream = new FileInputStream(new File("./target/test-classes/server.jks"));
             try {
                 trustStore.load(instream, "tompass".toCharArray());
             } finally {
@@ -195,7 +197,7 @@ public class JettyTest {
     
     @AfterClass
     public static void cleanup() {
-        if (server.isStarted()) {
+        if (server != null && server.isStarted()) {
             try {
                 server.stop();
             } catch (Exception e) {



Mime
View raw message