This is an automated email from the ASF dual-hosted git repository. robbie pushed a commit to branch new-logging in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 6bee244d8ff386b2d694092f01b6541c1b00a196 Author: Robbie Gemmell <[email protected]> AuthorDate: Tue Sep 13 13:22:17 2022 +0100 remove arg that isnt being used anymore --- .../activemq/artemis/utils/SpawnedVMSupport.java | 31 +++++----------------- .../tests/integration/client/JournalCrashTest.java | 2 +- .../cluster/FileLockNodeManagerTest.java | 2 +- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java index 397654f47c..164d1d5da0 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java @@ -27,15 +27,10 @@ import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - public class SpawnedVMSupport { static ConcurrentHashMap<Process, String> startedProcesses = null; - private static final Logger log = LoggerFactory.getLogger(SpawnedVMSupport.class); - public static Process spawnVM(final String className, final String... args) throws Exception { return SpawnedVMSupport.spawnVM(className, new String[0], true, args); } @@ -60,7 +55,7 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final String... args) throws Exception { - return SpawnedVMSupport.spawnVM(className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args); + return SpawnedVMSupport.spawnVM(className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args); } public static Process spawnVM(final String classpath, @@ -68,7 +63,7 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final String... args) throws Exception { - return SpawnedVMSupport.spawnVM(classpath, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args); + return SpawnedVMSupport.spawnVM(classpath, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args); } public static Process spawnVMWithLogMacher(String wordMatch, @@ -77,7 +72,7 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final String... args) throws Exception { - return SpawnedVMSupport.spawnVM(wordMatch, runnable, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, true, args); + return SpawnedVMSupport.spawnVM(wordMatch, runnable, className, "-Xms512m", "-Xmx512m", vmargs, logOutput, true, args); } public static Process spawnVM(final String className, @@ -86,9 +81,8 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final boolean logErrorOutput, - final boolean useLogging, final String... args) throws Exception { - return spawnVM(null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args); + return spawnVM(null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args); } public static Process spawnVM(final String classPath, @@ -98,9 +92,8 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final boolean logErrorOutput, - final boolean useLogging, final String... args) throws Exception { - return spawnVM(classPath, null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args); + return spawnVM(classPath, null, null, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args); } public static Process spawnVM(final String wordMatch, @@ -111,9 +104,8 @@ public class SpawnedVMSupport { final String[] vmargs, final boolean logOutput, final boolean logErrorOutput, - final boolean useLogging, final String... args) throws Exception { - return spawnVM(getClassPath(), wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, args); + return spawnVM(getClassPath(), wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, args); } @@ -126,9 +118,8 @@ public class SpawnedVMSupport { String[] vmargs, boolean logOutput, boolean logErrorOutput, - boolean useLogging, String... args) throws IOException, ClassNotFoundException { - return spawnVM(classPath, wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, useLogging, -1, args); + return spawnVM(classPath, wordMatch, wordRunning, className, memoryArg1, memoryArg2, vmargs, logOutput, logErrorOutput, -1, args); } public static String getClassPath() { @@ -171,7 +162,6 @@ public class SpawnedVMSupport { * @param vmargs * @param logOutput * @param logErrorOutput - * @param useLogging * @param debugPort if <=0 it means no debug * @param args * @return @@ -187,7 +177,6 @@ public class SpawnedVMSupport { String[] vmargs, boolean logOutput, boolean logErrorOutput, - boolean useLogging, long debugPort, String... args) throws IOException, ClassNotFoundException { final String javaPath = Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath().toString(); @@ -212,12 +201,6 @@ public class SpawnedVMSupport { } } - // The logs will be huge if you don't set this - if (useLogging) { - // TODO: visible uses appear to set this true, but we no longer do anything with it - // as we dont use the logging.configuration property anymore..remove method arg? - } - commandList.add("-Djava.io.tmpdir=" + System.getProperty("java.io.tmpdir", "./tmp")); commandList.add("-Djava.library.path=" + System.getProperty("java.library.path", "./native/bin")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java index 944fff8b28..334b319f56 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java @@ -165,7 +165,7 @@ public class JournalCrashTest extends SpawnedTestBase { */ private void runExternalProcess(final String tempDir, final int start, final int end) throws Exception { System.err.println("running external process..."); - Process process = SpawnedVMSupport.spawnVM(this.getClass().getCanonicalName(), "-Xms128m", "-Xmx128m", new String[]{}, true, true, true, tempDir, Integer.toString(start), Integer.toString(end)); + Process process = SpawnedVMSupport.spawnVM(this.getClass().getCanonicalName(), "-Xms128m", "-Xmx128m", new String[]{}, true, true, tempDir, Integer.toString(start), Integer.toString(end)); Assert.assertEquals(100, process.waitFor()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java index be2dc7dbd4..3c30e4a276 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/FileLockNodeManagerTest.java @@ -34,7 +34,7 @@ public class FileLockNodeManagerTest extends NodeManagerTest { final String[] args = new String[action.works() + 1]; args[0] = getTemporaryDir(); action.getWork(args, 1); - Process p = SpawnedVMSupport.spawnVM(this.getClass().getName(), "-Xms50m", "-Xmx512m", new String[0], true, true, true, args); + Process p = SpawnedVMSupport.spawnVM(this.getClass().getName(), "-Xms50m", "-Xmx512m", new String[0], true, true, args); processes.add(p); } for (Process process : processes) {
