Author: richard.opalka(a)jboss.com
Date: 2008-05-16 04:16:52 -0400 (Fri, 16 May 2008)
New Revision: 7054
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java
Log:
cleanup on tear down - we're running multiple tests in the same JVM
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java 2008-05-16
06:55:36 UTC (rev 7053)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractEJB3Test.java 2008-05-16
08:16:52 UTC (rev 7054)
@@ -38,29 +38,30 @@
*/
public abstract class AbstractEJB3Test extends JBossWSTest
{
- private String ejb3TargetNS =
"http://services.jbws1762.jaxws.ws.test.jboss.org/";
- private String ejb3ServiceName = "JBWS1762EJB3Service";
- private static EJB3Iface ejb3Proxy;
+ private EJB3Iface ejb3Proxy;
+
@Override
- public void setUp() throws Exception
+ protected void setUp() throws Exception
{
- super.setUp();
+ QName serviceName = new
QName("http://services.jbws1762.jaxws.ws.test.jboss.org/",
"JBWS1762EJB3Service");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" +
getWSDLLocation());
- if (ejb3Proxy == null)
- {
- QName serviceName = new QName(ejb3TargetNS, ejb3ServiceName);
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/"
+ getWSDLLocation());
-
- Service service = Service.create(wsdlURL, serviceName);
- ejb3Proxy = service.getPort(EJB3Iface.class);
- }
+ Service service = Service.create(wsdlURL, serviceName);
+ this.ejb3Proxy = service.getPort(EJB3Iface.class);
}
- protected abstract String getWSDLLocation();
-
+ @Override
+ protected void tearDown() throws Exception
+ {
+ this.ejb3Proxy = null;
+ }
+
public void testEJB3() throws Exception
{
- assertEquals(ejb3Proxy.echo("Hello!"), "Hello!");
+ assertEquals(this.ejb3Proxy.echo("Hello!"), "Hello!");
}
+
+ protected abstract String getWSDLLocation();
+
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java 2008-05-16
06:55:36 UTC (rev 7053)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1762/AbstractPOJOTest.java 2008-05-16
08:16:52 UTC (rev 7054)
@@ -38,29 +38,30 @@
*/
public abstract class AbstractPOJOTest extends JBossWSTest
{
- private String pojoTargetNS =
"http://services.jbws1762.jaxws.ws.test.jboss.org/";
- private String pojoServiceName = "JBWS1762POJOService";
+
private POJOIface pojoProxy;
@Override
protected void setUp() throws Exception
{
- super.setUp();
+ QName serviceName = new
QName("http://services.jbws1762.jaxws.ws.test.jboss.org/",
"JBWS1762POJOService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/" +
getWSDLLocation());
- if (pojoProxy == null)
- {
- QName serviceName = new QName(pojoTargetNS, pojoServiceName);
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/"
+ getWSDLLocation());
-
- Service service = Service.create(wsdlURL, serviceName);
- pojoProxy = (POJOIface)service.getPort(POJOIface.class);
- }
+ Service service = Service.create(wsdlURL, serviceName);
+ 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!");
}
+
+ protected abstract String getWSDLLocation();
+
}