qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1739096 - in /qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils: AbstractBrokerHolder.java SpawnedBrokerHolder.java
Date Thu, 14 Apr 2016 13:17:08 GMT
Author: orudyy
Date: Thu Apr 14 13:17:08 2016
New Revision: 1739096

URL: http://svn.apache.org/viewvc?rev=1739096&view=rev
Log:
NO-JIRA: Add ability to override a location of broker initial system properties for system
test brokers using JVM property

Modified:
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java

Modified: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java?rev=1739096&r1=1739095&r2=1739096&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
(original)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/AbstractBrokerHolder.java
Thu Apr 14 13:17:08 2016
@@ -243,6 +243,10 @@ public abstract class AbstractBrokerHold
             options.setManagementModePassword(QpidBrokerTestCase.MANAGEMENT_MODE_PASSWORD);
         }
         options.setStartupLoggedToSystemOut(false);
+        if (System.getProperty("test.broker.system.properties") != null)
+        {
+            options.setInitialSystemProperties(System.getProperty("test.broker.system.properties"));
+        }
         return options;
     }
 

Modified: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java?rev=1739096&r1=1739095&r2=1739096&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
(original)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/SpawnedBrokerHolder.java
Thu Apr 14 13:17:08 2016
@@ -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;
@@ -98,6 +99,16 @@ public class SpawnedBrokerHolder extends
             newCmd[cmd.length + 2] = brokerOptions.getManagementModePassword();
             cmd = newCmd;
         }
+
+        if (brokerOptions.getInitialSystemProperties() != null)
+        {
+            String[] newCmd = new String[cmd.length + 2];
+            System.arraycopy(cmd, 0, newCmd, 0, cmd.length);
+            newCmd[cmd.length] = "-props";
+            newCmd[cmd.length + 1] = brokerOptions.getInitialSystemProperties();
+            cmd = newCmd;
+        }
+
         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