This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 31a9637066742b6f731b9ea93a18dd5fe2a7a062
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 93485abd01..fa7fd319ba 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.Assume;
 import org.junit.Test;
 
@@ -53,7 +57,12 @@ public class TestAprLifecycleListener {
 
 
     private void doTestMultipleServerInstancesUsingTomcatNativeLibrary(boolean 
reverseShutdownOrder, boolean ffm) throws Exception {
+        Path tmpDir = Paths.get(System.getProperty("tomcat.test.temp", 
"output/tmp"));
+        Files.createDirectories(tmpDir);
+
         Tomcat tomcat1 = new Tomcat();
+        Path base1 = Files.createTempDirectory(tmpDir, "tomcat1-");
+        tomcat1.setBaseDir(base1.toAbsolutePath().toString());
         tomcat1.setPort(0);
         TesterSupport.initSsl(tomcat1);
         TesterSupport.configureSSLImplementation(tomcat1,
@@ -61,6 +70,8 @@ public class TestAprLifecycleListener {
         tomcat1.init();
 
         Tomcat tomcat2 = new Tomcat();
+        Path base2 = Files.createTempDirectory(tmpDir, "tomcat2-");
+        tomcat1.setBaseDir(base2.toAbsolutePath().toString());
         tomcat2.setPort(0);
         TesterSupport.initSsl(tomcat2);
         TesterSupport.configureSSLImplementation(tomcat2,
@@ -85,5 +96,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

Reply via email to