CXF-5610 fixed the system test error of jaxrs
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/53d4e069 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/53d4e069 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/53d4e069 Branch: refs/heads/master Commit: 53d4e0696c6fafa0648c703922d9698657f6ed05 Parents: 902671a Author: Willem Jiang <willem.ji...@gmail.com> Authored: Thu Mar 13 21:00:33 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Fri Mar 14 20:16:46 2014 +0800 ---------------------------------------------------------------------- .../apache/cxf/systest/jaxrs/security/BookHttpsServer.java | 9 +++++---- .../cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java | 1 + .../cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/53d4e069/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookHttpsServer.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookHttpsServer.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookHttpsServer.java index de37823..7388a94 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookHttpsServer.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/BookHttpsServer.java @@ -36,10 +36,6 @@ public class BookHttpsServer extends AbstractBusTestServerBase { protected void run() { - SpringBusFactory bf = new SpringBusFactory(); - Bus bus = bf.createBus(SERVER_CONFIG_FILE); - BusFactory.setDefaultBus(bus); - JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(BookStore.class); //default lifecycle is per-request, change it to singleton @@ -53,6 +49,11 @@ public class BookHttpsServer extends AbstractBusTestServerBase { public static void main(String[] args) { try { BookHttpsServer s = new BookHttpsServer(); + + SpringBusFactory bf = new SpringBusFactory(); + Bus bus = bf.createBus(SERVER_CONFIG_FILE); + BusFactory.setDefaultBus(bus); + s.start(); } catch (Exception ex) { ex.printStackTrace(); http://git-wip-us.apache.org/repos/asf/cxf/blob/53d4e069/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java index 6b7cac5..87fdd62 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java @@ -44,6 +44,7 @@ public class JAXRS20HttpsBookTest extends AbstractBusClientServerTestBase { @BeforeClass public static void startServers() throws Exception { + createStaticBus("org/apache/cxf/systest/jaxrs/security/jaxrs-https-server.xml"); assertTrue("server did not launch correctly", launchServer(BookHttpsServer.class, true)); } http://git-wip-us.apache.org/repos/asf/cxf/blob/53d4e069/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java index cc01d65..7fd3be9 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java @@ -54,6 +54,7 @@ public class JAXRSHttpsBookTest extends AbstractBusClientServerTestBase { "org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml"; @BeforeClass public static void startServers() throws Exception { + createStaticBus("org/apache/cxf/systest/jaxrs/security/jaxrs-https-server.xml"); assertTrue("server did not launch correctly", launchServer(BookHttpsServer.class, true)); }