Author: thomas.diesler(a)jboss.com
Date: 2008-05-20 09:43:20 -0400 (Tue, 20 May 2008)
New Revision: 7110
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.java
Log:
Don't share the port among tests
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.java 2008-05-20
13:28:50 UTC (rev 7109)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.java 2008-05-20
13:43:20 UTC (rev 7110)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxws.jbws1840;
+// $Id: $
+
import java.net.URL;
import java.util.Map;
@@ -46,31 +48,22 @@
{
public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1840";
- private static SecureEndpoint port;
-
public static Test suite()
{
return new JBossWSTestSetup(JBWS1840TestCase.class,
"jaxws-jbws1840.jar");
}
- protected void setUp() throws Exception
+ private SecureEndpoint getPort() throws Exception
{
- if (port == null)
- {
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jbws1840",
"SecureEndpointService");
- port = Service.create(wsdlURL, serviceName).getPort(SecureEndpoint.class);
- }
+ SecureEndpoint port = Service.create(wsdlURL,
serviceName).getPort(SecureEndpoint.class);
+ return port;
}
- public void testBothScenarios() throws Exception
+ public void testNegative() throws Exception
{
- _testNegative();
- _testPositive();
- }
-
- public void _testNegative()
- {
+ SecureEndpoint port = getPort();
try
{
port.echo("Hello");
@@ -82,8 +75,10 @@
}
}
- public void _testPositive()
+ public void testPositive() throws Exception
{
+ SecureEndpoint port = getPort();
+
Map<String, Object> reqContext =
((BindingProvider)port).getRequestContext();
reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");