Author: asoldano
Date: 2015-01-15 12:29:00 -0500 (Thu, 15 Jan 2015)
New Revision: 19381
Added:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/AbstractExceptionTests.java
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
Log:
Fixing failure w/ -Pfast
Added:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/AbstractExceptionTests.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/AbstractExceptionTests.java
(rev 0)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/AbstractExceptionTests.java 2015-01-15
17:29:00 UTC (rev 19381)
@@ -0,0 +1,133 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.samples.exception;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.wsf.test.JBossWSTest;
+import org.junit.Test;
+
+/**
+ * Test JAX-WS exception handling
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ */
+public abstract class AbstractExceptionTests extends JBossWSTest
+{
+ @Test
+ @RunAsClient
+ public void testRuntimeException() throws Exception
+ {
+ try
+ {
+ getHelper().testRuntimeException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testSoapFaultException() throws Exception
+ {
+ try
+ {
+ getHelper().testSoapFaultException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testApplicationException() throws Exception
+ {
+ try
+ {
+ getHelper().testApplicationException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testSOAP12RuntimeException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testRuntimeException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testSOAP12SoapFaultException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testSoapFaultException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ public void testSOAP12ApplicationException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testApplicationException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ private static void fail(Exception e) {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bos);
+ e.printStackTrace(ps);
+ fail(bos.toString());
+ ps.close();
+ }
+
+ abstract protected ExceptionHelper getHelper();
+
+ abstract protected SOAP12ExceptionHelper getSOAP12Helper();
+}
Property changes on:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/AbstractExceptionTests.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2015-01-15
15:18:23 UTC (rev 19380)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2015-01-15
17:29:00 UTC (rev 19381)
@@ -37,7 +37,7 @@
* @author alessio.soldano(a)jboss.com
*/
@RunWith(Arquillian.class)
-public class ExceptionEJB3TestCase extends ExceptionTestCase
+public class ExceptionEJB3TestCase extends AbstractExceptionTests
{
@Deployment(name="jaxws-samples-exception", testable = false)
public static JavaArchive createDeployment() {
Modified:
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
---
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2015-01-15
15:18:23 UTC (rev 19380)
+++
stack/cxf/branches/arquillian/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2015-01-15
17:29:00 UTC (rev 19381)
@@ -21,18 +21,13 @@
*/
package org.jboss.test.ws.jaxws.samples.exception;
-import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.PrintStream;
import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
-import org.junit.Test;
import org.junit.runner.RunWith;
/**
@@ -41,7 +36,7 @@
* @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
*/
@RunWith(Arquillian.class)
-public class ExceptionTestCase extends JBossWSTest
+public class ExceptionTestCase extends AbstractExceptionTests
{
@Deployment(name="jaxws-samples-exception-jse-plain", testable = false)
public static WebArchive createDeployments() {
@@ -67,99 +62,7 @@
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/samples/exception/WEB-INF/web.xml"));
return archive;
}
-
- @Test
- @RunAsClient
- public void testRuntimeException() throws Exception
- {
- try
- {
- getHelper().testRuntimeException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
-
- @Test
- @RunAsClient
- public void testSoapFaultException() throws Exception
- {
- try
- {
- getHelper().testSoapFaultException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
-
- @Test
- @RunAsClient
- public void testApplicationException() throws Exception
- {
- try
- {
- getHelper().testApplicationException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
-
- @Test
- @RunAsClient
- public void testSOAP12RuntimeException() throws Exception
- {
- try
- {
- getSOAP12Helper().testRuntimeException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
-
- @Test
- @RunAsClient
- public void testSOAP12SoapFaultException() throws Exception
- {
- try
- {
- getSOAP12Helper().testSoapFaultException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
-
- @Test
- @RunAsClient
- public void testSOAP12ApplicationException() throws Exception
- {
- try
- {
- getSOAP12Helper().testApplicationException();
- }
- catch (Exception e)
- {
- fail(e);
- }
- }
- private static void fail(Exception e) {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(bos);
- e.printStackTrace(ps);
- fail(bos.toString());
- ps.close();
- }
-
protected ExceptionHelper getHelper()
{
return new ExceptionHelper("http://" + getServerHost() + ":" +
getServerPort() +
"/jaxws-samples-exception-jse-plain/ExceptionEndpointService");