mirror of https://github.com/apache/activemq.git
Replace use of deprecated Runtime.exe(String cmd)
This commit is contained in:
parent
ea2b4f817a
commit
58860a1580
|
@ -48,8 +48,8 @@ public class SSHTunnelNetworkReconnectTest extends NetworkReconnectTest {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
startProcess("ssh -Nn -L60006:localhost:61616 localhost");
|
startProcess("ssh", "-Nn", "-L60006:localhost:61616", "localhost");
|
||||||
startProcess("ssh -Nn -L60007:localhost:61617 localhost");
|
startProcess("ssh", "-Nn", "-L60007:localhost:61617", "localhost");
|
||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ public class SSHTunnelNetworkReconnectTest extends NetworkReconnectTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startProcess(String command) throws IOException {
|
private void startProcess(String... command) throws IOException {
|
||||||
final Process process = Runtime.getRuntime().exec(command);
|
final Process process = Runtime.getRuntime().exec(command);
|
||||||
processes.add(process);
|
processes.add(process);
|
||||||
new Thread("stdout: " + command) {
|
new Thread("stdout: " + command) {
|
||||||
|
|
Loading…
Reference in New Issue