This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 17f1ae2c0e Fix intermittent TestManagerWebapp.testDeploy failure
17f1ae2c0e is described below
commit 17f1ae2c0ef4d3e943530318efbfc0e9df8677b0
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 10:03:30 2026 +0000
Fix intermittent TestManagerWebapp.testDeploy failure
Saving the configuration modifies the deployed context.xml. If the
background
process ran before the test completed it redeployed the web application and
the manager reported it as stopped. Disable auto deployment for the test.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
test/org/apache/catalina/manager/TestManagerWebapp.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/org/apache/catalina/manager/TestManagerWebapp.java
b/test/org/apache/catalina/manager/TestManagerWebapp.java
index 5ed87d9e15..43a037ed40 100644
--- a/test/org/apache/catalina/manager/TestManagerWebapp.java
+++ b/test/org/apache/catalina/manager/TestManagerWebapp.java
@@ -32,6 +32,7 @@ import org.junit.Test;
import static org.apache.catalina.startup.SimpleHttpClient.CRLF;
import org.apache.catalina.Context;
+import org.apache.catalina.Host;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
@@ -280,6 +281,9 @@ public class TestManagerWebapp extends TomcatBaseTest {
// Add host config otherwise there's no JMX deployer bean
HostConfig hostConfig = new HostConfig();
ctx.getParent().addLifecycleListener(hostConfig);
+ // Saving the configuration modifies the deployed context.xml. Do not
let the background process notice that
+ // and redeploy the web application part way through the test.
+ ((Host) ctx.getParent()).setAutoDeploy(false);
tomcat.start();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]