This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new bbcd15c3da Create CATALINA_BASE dirs in standard location
bbcd15c3da is described below
commit bbcd15c3dadacc0519b8ed03d74263f644bcead5
Author: Mark Thomas <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]