You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/08/14 21:09:31 UTC

svn commit: r685997 - /cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java

Author: dkulp
Date: Thu Aug 14 12:09:30 2008
New Revision: 685997

URL: http://svn.apache.org/viewvc?rev=685997&view=rev
Log:
Propogate the vmargs down into the forked processes

Modified:
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java

Modified: cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?rev=685997&r1=685996&r2=685997&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java Thu Aug 14 12:09:30 2008
@@ -35,6 +35,7 @@
 import java.util.logging.Logger;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 
 public class ServerLauncher {
     public static final int DEFAULT_TIMEOUT = 3 * 60 * 1000;
@@ -331,7 +332,19 @@
         if (Boolean.getBoolean("java.awt.headless")) {
             cmd.add("-Djava.awt.headless=true");
         }
-        cmd.add("-ea");
+        String vmargs = System.getProperty("surefire.fork.vmargs");
+        if (StringUtils.isEmpty(vmargs)) {
+            cmd.add("-ea");
+        } else {
+            vmargs = vmargs.trim();
+            int idx = vmargs.indexOf(' ');
+            while (idx != -1) {
+                cmd.add(vmargs.substring(0, idx));
+                vmargs = vmargs.substring(idx + 1);
+                idx = vmargs.indexOf(' ');
+            }
+            cmd.add(vmargs);
+        }
         
         cmd.add("-Djavax.xml.ws.spi.Provider=org.apache.cxf.jaxws.spi.ProviderImpl");
         String portClose = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");