qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject qpid-broker-j git commit: QPID-7945 : SpawnedBrokerHolder does not work well on windows
Date Mon, 02 Oct 2017 19:38:27 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 0e2f1e003 -> 8abda0619


QPID-7945 : SpawnedBrokerHolder does not work well on windows


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/8abda061
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/8abda061
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/8abda061

Branch: refs/heads/master
Commit: 8abda0619a91762581cb669a00174bc89a273c03
Parents: 0e2f1e0
Author: Rob Godfrey <rgodfrey@apache.org>
Authored: Mon Oct 2 21:37:54 2017 +0200
Committer: Rob Godfrey <rgodfrey@apache.org>
Committed: Mon Oct 2 21:37:54 2017 +0200

----------------------------------------------------------------------
 .../apache/qpid/test/utils/SpawnedBrokerHolder.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/8abda061/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
----------------------------------------------------------------------
diff --git a/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java b/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
index bce8ba8..788f10f 100644
--- a/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
+++ b/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -95,6 +96,19 @@ public class SpawnedBrokerHolder extends AbstractBrokerHolder
             cmd = newCmd;
         }
 
+        // bat files will treat = as an argument separator, so if an argument contains =
it needs to be quoted
+        if(cmd[0].endsWith(".bat"))
+        {
+            for(int i = 1 ; i < cmd.length; i++)
+            {
+                String orig = cmd[i];
+                if(orig.contains("=") && !orig.contains("\""))
+                {
+                    cmd[i] = "\"" + orig + "\"";
+                }
+            }
+        }
+        
         ProcessBuilder pb = new ProcessBuilder(cmd);
         pb.redirectErrorStream(true);
         Map<String, String> processEnv = pb.environment();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message