This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b8077b83175719e8e1ccc5865b88730d71b3734a Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jun 26 15:21:17 2024 +0100 Create CATALINA_BASE dirs in standard location --- test/org/apache/catalina/core/TestAprLifecycleListener.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/org/apache/catalina/core/TestAprLifecycleListener.java b/test/org/apache/catalina/core/TestAprLifecycleListener.java index 6ea614174c..ae6a783e5c 100644 --- a/test/org/apache/catalina/core/TestAprLifecycleListener.java +++ b/test/org/apache/catalina/core/TestAprLifecycleListener.java @@ -16,6 +16,10 @@ */ package org.apache.catalina.core; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + import org.junit.Test; import org.apache.catalina.startup.Tomcat; @@ -37,14 +41,21 @@ public class TestAprLifecycleListener { private void doTestMultipleServerInstancesUsingTomcatNativeLibrary(boolean reverseShutdownOrder) throws Exception { + Path tmpDir = Paths.get(System.getProperty("tomcat.test.temp", "output/tmp")); + Files.createDirectories(tmpDir); + Tomcat tomcat1 = new Tomcat(); tomcat1.getServer().addLifecycleListener(new AprLifecycleListener()); + Path base1 = Files.createTempDirectory(tmpDir, "tomcat1-"); + tomcat1.setBaseDir(base1.toAbsolutePath().toString()); tomcat1.setPort(0); TesterSupport.initSsl(tomcat1); TesterSupport.configureSSLImplementation(tomcat1, OpenSSLImplementation.class.getName()); tomcat1.init(); Tomcat tomcat2 = new Tomcat(); tomcat2.getServer().addLifecycleListener(new AprLifecycleListener()); + Path base2 = Files.createTempDirectory(tmpDir, "tomcat2-"); + tomcat2.setBaseDir(base2.toAbsolutePath().toString()); tomcat2.setPort(0); TesterSupport.initSsl(tomcat2); TesterSupport.configureSSLImplementation(tomcat2, OpenSSLImplementation.class.getName()); @@ -68,5 +79,5 @@ public class TestAprLifecycleListener { tomcat2.stop(); tomcat2.destroy(); } -} + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org