This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push: new e1cdf94e Refactor constant e1cdf94e is described below commit e1cdf94eca8b6ebd138f7405d5f154aef81cf7c9 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Sep 23 08:29:44 2023 -0400 Refactor constant --- commons-vfs2/src/test/java/org/apache/commons/vfs2/RunTest.java | 2 +- commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/RunTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/RunTest.java index bfd6281f..36abb6ee 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/RunTest.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/RunTest.java @@ -29,7 +29,7 @@ public class RunTest { final Properties props = System.getProperties(); props.setProperty("test.data.src", "src/test-data"); - props.setProperty("test.basedir", "core/target/test-classes/test-data"); + props.setProperty(VfsTestUtils.TEST_BASE_DIR, "core/target/test-classes/test-data"); props.setProperty("test.basedir.res", "test-data"); props.setProperty("test.policy", "src/test-data/test.policy"); props.setProperty("test.secure", "false"); diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java index 774ea536..dbeeedbb 100644 --- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java +++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/VfsTestUtils.java @@ -34,6 +34,8 @@ import org.apache.commons.vfs2.util.Messages; */ public abstract class VfsTestUtils { + public static final String TEST_BASE_DIR = "test.basedir"; + private static File baseDir; /** URL pattern */ @@ -102,7 +104,7 @@ public abstract class VfsTestUtils { * @return the test directory as a String */ public static String getTestDirectory() { - return System.getProperty("test.basedir", "target/test-classes/test-data"); + return System.getProperty(TEST_BASE_DIR, "target/test-classes/test-data"); } /**