This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 84d42db43e Fix intermittent TestManagerWebapp.testDeploy failure
84d42db43e is described below
commit 84d42db43ed90b27b37072719177642fa2f97224
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 10:03:31 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 f54f2a0e0e..121dbc5a6d 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]