This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 4c3ba751ff Fix intermittent TestManagerWebapp.testDeploy failure
4c3ba751ff is described below
commit 4c3ba751ff260f62531fd2dc0226b23513b56d23
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 e56c4b0fea..01d0244afc 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]