[jbossws-commits] JBossWS SVN: r9747 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Apr 6 09:19:46 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-04-06 09:19:46 -0400 (Mon, 06 Apr 2009)
New Revision: 9747

Modified:
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java
Log:
[JBWS-2327] fixing test case

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-04-06 13:18:05 UTC (rev 9746)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSRunClientTestCase.java	2009-04-06 13:19:46 UTC (rev 9747)
@@ -3,8 +3,10 @@
 import java.io.File;
 import java.io.BufferedReader;
 import java.io.FileReader;
+import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 
 import org.jboss.wsf.test.JBossWSTest;
 
@@ -18,8 +20,9 @@
 
    private static final String FS = System.getProperty("file.separator");
    private static final String PS = System.getProperty("path.separator");
+   private static final boolean isUnix = ":".equals( PS ); 
    private static final String SP = " ";
-   private static final String EXT = ":".equals( PS ) ? ".sh" : ".bat";
+   private static final String EXT = isUnix ? ".sh" : ".bat";
    private List<String> integrationJars;
    private String commandLineProperties;
    private String additionalClasspath;
@@ -54,14 +57,16 @@
    public void test() throws Exception
    {
       StringBuilder sb = new StringBuilder();
+      Map<String, String> env = new HashMap<String, String>();
+      env.put("WSRUNCLIENT_CLASSPATH", additionalClasspath);
+      env.put("JAVA_OPTS", commandLineProperties);
+      
       sb.append(jbossHome).append(FS).append("bin").append(FS).append("wsrunclient").append(EXT);
-      sb.append(SP).append("-classpath").append(SP).append(additionalClasspath);
-      sb.append(SP).append(commandLineProperties);
       sb.append(SP).append("junit.textui.TestRunner").append(SP);
       String commandWithoutTestParam = sb.toString();
       for (String test : testsToExecute)
       {
-         executeCommand(commandWithoutTestParam + test, "wsrunclient");
+         executeCommand(commandWithoutTestParam + test, null, "wsrunclient", env);
          // There's no need to verify the test output.
          // If test that is executed fails executeCommand will fail (because of SC != 0)
          // The same applies to wrongly configured wsrunclient classpath.




More information about the jbossws-commits mailing list