Author: alessio.soldano(a)jboss.com
Date: 2013-06-21 06:27:16 -0400 (Fri, 21 Jun 2013)
New Revision: 17717
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCaseForked.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Split ClientSpringAppTestCase to prevent issues during parallel tests execution
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java 2013-06-21
09:34:58 UTC (rev 17716)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCase.java 2013-06-21
10:27:16 UTC (rev 17717)
@@ -49,11 +49,6 @@
assertEquals("1", runTestInContainer("testSpringAvailability",
Helper.class.getName()));
}
- public void testJBossWSCXFBus() throws Exception
- {
- assertEquals("1", runTestInContainer("testJBossWSCXFBus",
Helper.class.getName()));
- }
-
public void testJBossWSCXFSpringBus() throws Exception
{
assertEquals("1", runTestInContainer("testJBossWSCXFSpringBus",
Helper.class.getName()));
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCaseForked.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCaseForked.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/spring/ClientSpringAppTestCaseForked.java 2013-06-21
10:27:16 UTC (rev 17717)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.spring;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * This test is an addition to the
org.jboss.test.ws.jaxws.cxf.spring.ClientSpringAppTestCase that runs
+ * in forked mode as it requires setting sys props during test and hence can't be
executed concurrently.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Jun-2013
+ */
+public final class ClientSpringAppTestCaseForked extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(ClientSpringAppTestCaseForked.class,
"jaxws-cxf-spring-client.war, jaxws-cxf-spring.war");
+ }
+
+ public void testJBossWSCXFBus() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testJBossWSCXFBus",
Helper.class.getName()));
+ }
+
+ private String runTestInContainer(String test, String helper) throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-spring-client?path=/jaxws-cxf-spring/EndpointService&method="
+ + test + "&helper=" + helper);
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ return br.readLine();
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-21 09:34:58 UTC (rev 17716)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-06-21 10:27:16 UTC (rev 17717)
@@ -377,6 +377,7 @@
<skip>false</skip>
<includes>
<include>**/jaxws/cxf/httpproxy/*TestCaseForked.java</include>
+ <include>**/jaxws/cxf/spring/*TestCaseForked.java</include>
<include>**/jaxws/samples/schemavalidation/*TestCaseForked.java</include>
<include>**/jbws2150/**/*TestCaseForked.java</include>
<include>**/jms*/**/*TestCaseForked.java</include>