Author: richard.opalka(a)jboss.com
Date: 2008-05-16 04:17:36 -0400 (Fri, 16 May 2008)
New Revision: 7055
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java
Log:
cleanup on tear down - we're running multiple tests in the same JVM
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java 2008-05-16
08:16:52 UTC (rev 7054)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractEJB2Test.java 2008-05-16
08:17:36 UTC (rev 7055)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1762;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -40,24 +39,32 @@
*/
public abstract class AbstractEJB2Test extends JBossWSTest
{
+
private EJB2Iface ejb2Proxy;
- public void setUp() throws Exception
+ @Override
+ protected void setUp() throws Exception
{
- super.setUp();
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" +
getWSDLLocation());
URL mappingURL =
getResourceURL("jaxrpc/jbws1762/META-INF/jaxrpc-mapping.xml");
QName serviceName = new
QName("http://org.jboss.test.webservice/jbws1762", "EJB2Bean");
ServiceFactoryImpl factory = new ServiceFactoryImpl();
ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName,
mappingURL);
- ejb2Proxy = (EJB2Iface)service.getPort(EJB2Iface.class);
+ this.ejb2Proxy = (EJB2Iface)service.getPort(EJB2Iface.class);
}
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.ejb2Proxy = null;
+ }
+
protected abstract String getWSDLLocation();
public void testEJB2() throws Exception
{
- assertEquals(ejb2Proxy.echo("Hello!"), "Hello!");
+ assertEquals(this.ejb2Proxy.echo("Hello!"), "Hello!");
}
+
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java 2008-05-16
08:16:52 UTC (rev 7054)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1762/AbstractPOJOTest.java 2008-05-16
08:17:36 UTC (rev 7055)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxrpc.jbws1762;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -41,30 +40,32 @@
*/
public abstract class AbstractPOJOTest extends JBossWSTest
{
- private String pojoTargetNS = "http://org.jboss.test.ws/jbws1762";
- private String pojoServiceName = "POJOBean";
+
private POJOIface pojoProxy;
- public void setUp() throws Exception
+ @Override
+ protected void setUp() throws Exception
{
- super.setUp();
-
- if (pojoProxy == null)
- {
- ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/"
+ getWSDLLocation());
- URL mappingURL =
getResourceURL("jaxrpc/jbws1762/WEB-INF/jaxrpc-mapping.xml");
- QName serviceName = new QName(pojoTargetNS, pojoServiceName);
-
- Service service = factory.createService(wsdlURL, serviceName, mappingURL);
- pojoProxy = (POJOIface)service.getPort(POJOIface.class);
- }
+ ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" +
getWSDLLocation());
+ URL mappingURL =
getResourceURL("jaxrpc/jbws1762/WEB-INF/jaxrpc-mapping.xml");
+ QName serviceName = new QName("http://org.jboss.test.ws/jbws1762",
"POJOBean");
+
+ Service service = factory.createService(wsdlURL, serviceName, mappingURL);
+ this.pojoProxy = (POJOIface)service.getPort(POJOIface.class);
}
- protected abstract String getWSDLLocation();
-
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.pojoProxy = null;
+ }
+
public void testPOJO() throws Exception
{
- assertEquals(pojoProxy.echo("Hello!"), "Hello!");
+ assertEquals(this.pojoProxy.echo("Hello!"), "Hello!");
}
+
+ protected abstract String getWSDLLocation();
+
}
Show replies by date