This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new fd97a07 Remove log4j2 config file from accumuo-test jar (#2537) fd97a07 is described below commit fd97a07eca6cd88d819a9c3875b99c1f1b184b17 Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Wed Mar 2 10:18:46 2022 -0500 Remove log4j2 config file from accumuo-test jar (#2537) This change removes the log4j2-test.properties file from the accumulo-test.jar, but keeps it on the class path for the unit and integration tests in the test module. This ensures our tests log useful information during the build testing, but avoids leaking that log4j configuration into the class path in other situations where the accumulo-test.jar might be used for other kinds of testing. This fixes #2527 Also move the shellit.shellit file to complete #2497 and remove the last item from the root of our jars. Also tweak the system property configuration of maven-failsafe-plugin in the root pom.xml to ensure the configuration there is applied even when the test module sets its own additional system properties for the plugin. --- pom.xml | 4 ++-- test/pom.xml | 6 ++++++ test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java | 2 +- .../log4j2-test.properties | 0 .../main/{resources => unpackaged-classpath-files}/shellit.shellit | 0 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 256a756..f082116 100644 --- a/pom.xml +++ b/pom.xml @@ -858,7 +858,7 @@ <reuseForks>${surefire.reuseForks}</reuseForks> <excludedGroups>${surefire.excludedGroups}</excludedGroups> <groups>${surefire.groups}</groups> - <systemPropertyVariables> + <systemPropertyVariables combine.children="append"> <java.io.tmpdir>${project.build.directory}</java.io.tmpdir> </systemPropertyVariables> <argLine>${unitTestMemSize} ${extraTestArgs}</argLine> @@ -872,7 +872,7 @@ <reuseForks>${failsafe.reuseForks}</reuseForks> <excludedGroups>${failsafe.excludedGroups}</excludedGroups> <groups>${failsafe.groups}</groups> - <systemPropertyVariables> + <systemPropertyVariables combine.children="append"> <java.io.tmpdir>${project.build.directory}</java.io.tmpdir> </systemPropertyVariables> <argLine>${extraTestArgs}</argLine> diff --git a/test/pom.xml b/test/pom.xml index 78fb227..37d3b83 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -234,6 +234,9 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> + <additionalClasspathElements> + <item>src/main/unpackaged-classpath-files/</item> + </additionalClasspathElements> <testSourceDirectory>${project.basedir}/src/main/java/</testSourceDirectory> <testClassesDirectory>${project.build.directory}/classes/</testClassesDirectory> <systemPropertyVariables> @@ -248,6 +251,9 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> + <additionalClasspathElements> + <item>src/main/unpackaged-classpath-files/</item> + </additionalClasspathElements> <systemPropertyVariables> <org.apache.accumulo.test.functional.useCredProviderForIT>${useCredProviderForIT}</org.apache.accumulo.test.functional.useCredProviderForIT> <org.apache.accumulo.test.functional.useSslForIT>${useSslForIT}</org.apache.accumulo.test.functional.useSslForIT> diff --git a/test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java b/test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java index cdfa98f..875b615 100644 --- a/test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java +++ b/test/src/main/java/org/apache/accumulo/test/shell/ShellIT.java @@ -481,7 +481,7 @@ public class ShellIT extends SharedMiniClusterBase { Shell.log.debug("Starting exec file test --------------------------"); shell.config("--config-file", config.toString(), "-u", "root", "-p", getRootPassword(), "-zi", getCluster().getInstanceName(), "-zh", getCluster().getZooKeepers(), "-f", - "src/main/resources/shellit.shellit"); + "src/main/unpackaged-classpath-files/shellit.shellit"); assertEquals(0, shell.start()); assertGoodExit("Unknown command", false); } diff --git a/test/src/main/resources/log4j2-test.properties b/test/src/main/unpackaged-classpath-files/log4j2-test.properties similarity index 100% rename from test/src/main/resources/log4j2-test.properties rename to test/src/main/unpackaged-classpath-files/log4j2-test.properties diff --git a/test/src/main/resources/shellit.shellit b/test/src/main/unpackaged-classpath-files/shellit.shellit similarity index 100% rename from test/src/main/resources/shellit.shellit rename to test/src/main/unpackaged-classpath-files/shellit.shellit