JBossWS SVN: r9674 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-03-24 09:29:09 -0400 (Tue, 24 Mar 2009)
New Revision: 9674
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java
Log:
[JBWS-2327] adding javadoc comments how the test works
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java 2009-03-24 11:26:26 UTC (rev 9673)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java 2009-03-24 13:29:09 UTC (rev 9674)
@@ -42,7 +42,13 @@
}
/**
- * Executing wsrunclient commandline script
+ * Executing wsrunclient commandline script.
+ * We're using simple trick here as we're running
+ * junit tests via wsrunclient here.
+ * The reason is we don't need to touch any test case
+ * plus we can add any test case to the execution anytime.
+ * Plus invoking the test classes via main method vs. junit runner is equivalent
+ * from wsrunclient point of view.
* @throws Exception if any error occurs
*/
public void test() throws Exception
@@ -75,7 +81,12 @@
}
/**
- * Prepares additional classpath containing junit lib, test classes directory and jbossws integration jars
+ * Prepares additional classpath containing junit lib, test classes directory and jbossws integration jars.
+ * The junit is needed, because we're running junit samples tests via wsrunclient.
+ * Test classes directory contains test cases we're executing via wsrunclient.
+ * Finally integration jars are needed because every test case extends JBossWSTest and it needs integration
+ * jars to deploy tested archives to the server programatically. Generally, users of wsrunclient
+ * will usually specify just test classes directory and test class to invoke main method on.
*/
private String prepareAdditionalClasspath()
{
@@ -158,6 +169,10 @@
return retVal;
}
+ /**
+ * Detects whether we're running the distribution tests
+ * @return true if distro tests are executed, false otherwise
+ */
private boolean isDistroTest()
{
return Boolean.getBoolean("binary.distribution");
15 years, 9 months
JBossWS SVN: r9673 - in stack/metro/trunk/modules: client/src/main/java/org/jboss/wsf/stack/metro/tools and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-03-24 07:26:26 -0400 (Tue, 24 Mar 2009)
New Revision: 9673
Modified:
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderJAXWS.java
stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroProviderImpl.java
stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/RequestHandlerImpl.java
Log:
[JBWS-2555] Misc minor fixes
Modified: stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderJAXWS.java
===================================================================
--- stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderJAXWS.java 2009-03-24 11:25:39 UTC (rev 9672)
+++ stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/client/ServiceRefBinderJAXWS.java 2009-03-24 11:26:26 UTC (rev 9673)
@@ -37,6 +37,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
@@ -173,6 +174,8 @@
declaringClass = ((Method)anElement).getDeclaringClass();
else if (anElement instanceof Class)
declaringClass = (Class)anElement;
+ else
+ throw new WebServiceException("Unsupported anElement: " + anElement);
handlerChain = declaringClass.getPackage().getName().replace('.', '/') + "/" + handlerChain;
}
Modified: stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroProviderImpl.java
===================================================================
--- stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroProviderImpl.java 2009-03-24 11:25:39 UTC (rev 9672)
+++ stack/metro/trunk/modules/client/src/main/java/org/jboss/wsf/stack/metro/tools/MetroProviderImpl.java 2009-03-24 11:26:26 UTC (rev 9673)
@@ -21,16 +21,15 @@
*/
package org.jboss.wsf.stack.metro.tools;
-import org.jboss.wsf.spi.tools.WSContractProvider;
-import org.apache.tools.ant.taskdefs.Classloader;
-
import java.io.File;
import java.io.PrintStream;
-import java.util.List;
-import java.util.ArrayList;
-import java.net.URLClassLoader;
import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import org.jboss.wsf.spi.tools.WSContractProvider;
+
import com.sun.tools.ws.wscompile.WsgenTool;
/**
Modified: stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/RequestHandlerImpl.java
===================================================================
--- stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/RequestHandlerImpl.java 2009-03-24 11:25:39 UTC (rev 9672)
+++ stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/RequestHandlerImpl.java 2009-03-24 11:26:26 UTC (rev 9673)
@@ -108,7 +108,7 @@
{
MessageStreamAdapter adapter = endpoint.getAttachment(MessageStreamAdapter.class);
if (adapter == null)
- throw new IllegalStateException("Cannot obtain: " + adapter.getClass().getName());
+ throw new IllegalStateException("Cannot obtain: " + adapter);
try
{
@@ -238,10 +238,9 @@
*/
private static void copyProperties(InvocationContext invCtx, MessageStreamContext msgCtx)
{
- boolean invCtxAvailable = (invCtx != null);
- boolean invCtxHasProps = (invCtx.getAttachment(Properties.class) != null);
+ boolean invCtxHasProps = (invCtx != null) && (invCtx.getAttachment(Properties.class) != null);
- if (invCtxAvailable && invCtxHasProps)
+ if (invCtxHasProps)
{
Map<String, String> msgReqCtx = msgCtx.getRequestContext();
Properties invCtxProps = invCtx.getAttachment(Properties.class);
15 years, 9 months
JBossWS SVN: r9672 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws: jbws1733 and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-03-24 07:25:39 -0400 (Tue, 24 Mar 2009)
New Revision: 9672
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1733/JBWS1733Impl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2000/JBWS2000TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2241/JBWS2241TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/Timer.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java
Log:
[JBWS-2555] Misc minor fixes
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -78,7 +78,7 @@
}
// handler that verifies the attachment that have been added on the server-side
- class VerifyAttachmentHandler extends GenericSOAPHandler
+ static class VerifyAttachmentHandler extends GenericSOAPHandler
{
protected boolean handleInbound(MessageContext msgContext)
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1733/JBWS1733Impl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1733/JBWS1733Impl.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1733/JBWS1733Impl.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -48,10 +48,10 @@
Integer counter = (Integer)session.getAttribute("counter");
if (counter == null)
{
- counter = new Integer(0);
+ counter = Integer.valueOf(0);
System.out.println("Starting the Session");
}
- counter = new Integer(counter.intValue() + 1);
+ counter = Integer.valueOf(counter.intValue() + 1);
session.setAttribute("counter", counter);
return counter;
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2000/JBWS2000TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2000/JBWS2000TestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2000/JBWS2000TestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -40,9 +40,8 @@
*/
public class JBWS2000TestCase extends JBossWSTest
{
+ private FileTransferService port;
- private static FileTransferService port;
-
public static Test suite()
{
return new JBossWSTestSetup(JBWS2000TestCase.class, "jaxws-jbws2000.jar");
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2241/JBWS2241TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2241/JBWS2241TestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2241/JBWS2241TestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -41,7 +41,7 @@
*/
public class JBWS2241TestCase extends JBossWSTest
{
- private static EndpointInterface port;
+ private EndpointInterface port;
public static Test suite()
{
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -45,10 +45,9 @@
*/
public class JBWS2278TestCase extends JBossWSTest
{
+ private TestEndpoint port11;
+ private TestEndpoint port12;
- private static TestEndpoint port11;
- private static TestEndpoint port12;
-
public static Test suite() throws Exception
{
return new JBossWSTestSetup(JBWS2278TestCase.class, "jaxws-jbws2278.war");
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/Timer.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/Timer.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/handler/Timer.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -42,7 +42,7 @@
public synchronized void push(long t)
{
- timings.push(new Long(t));
+ timings.push(Long.valueOf(t));
}
public synchronized long pop()
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -41,7 +41,7 @@
*/
public class WebServiceContextEJBTestCase extends JBossWSTest
{
- private static Endpoint port;
+ private Endpoint port;
public static Test suite()
{
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/WebServiceContextJSETestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.samples.context;
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -41,7 +40,7 @@
*/
public class WebServiceContextJSETestCase extends JBossWSTest
{
- private static Endpoint port;
+ private Endpoint port;
public static Test suite()
{
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java 2009-03-24 10:59:18 UTC (rev 9671)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/webfault/WebFaultTestCase.java 2009-03-24 11:25:39 UTC (rev 9672)
@@ -150,7 +150,7 @@
}
catch (CustomException e)
{
- assertEquals(new Integer(5), e.getNumber());
+ assertEquals(Integer.valueOf(5), e.getNumber());
assertNull(e.getTransientString());
}
catch (Exception e)
@@ -164,7 +164,7 @@
}
catch (SimpleException e)
{
- assertEquals(new Integer(5), e.getNumber());
+ assertEquals(Integer.valueOf(5), e.getNumber());
}
catch (Exception e)
{
15 years, 9 months