(tomcat-maven-plugin) branch trunk updated: Fix tests weirdness

2026-04-21 Thread remm
This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 2e27936  Fix tests weirdness
2e27936 is described below

commit 2e279368b06a976c4e2cc4fe6abf540f09418e97
Author: remm 
AuthorDate: Tue Apr 21 13:38:55 2026 +0200

Fix tests weirdness

Mostly sharing a single docBase is not a good move.
---
 .../org/apache/tomcat/maven/it/TomcatContextGoalsIT.java |  5 -
 .../container-goals-test/src/main/tomcatconf/server.xml  |  3 +--
 src/test/resources/context-goals-test/pom.xml| 16 +---
 .../context-goals-test/src/main/tomcatconf/server.xml|  3 +--
 .../src/main/tomcatconf/server.xml   |  2 +-
 src/test/resources/deploy-war-project/pom.xml|  3 +++
 .../deploy-war-project/src/main/tomcatconf/server.xml|  2 +-
 7 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java 
b/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
index b3fe7c8..8089d5d 100644
--- a/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
+++ b/src/test/java/org/apache/tomcat/maven/it/TomcatContextGoalsIT.java
@@ -22,6 +22,8 @@ import org.junit.Test;
 
 import java.io.File;
 
+import static junitx.framework.StringAssert.assertContains;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 public class TomcatContextGoalsIT extends AbstractWarProjectIT {
@@ -38,13 +40,14 @@ public class TomcatContextGoalsIT extends 
AbstractWarProjectIT {
 @Test
 public void testContextGoals() throws Exception {
 final String responseBody = executeVerifyWithGet();
+assertNotNull("Received message body must not be null.", responseBody);
+assertContains("Response must match expected content.", "It works !!", 
responseBody);
 
 assertTrue("Tomcat folder should exist in target folder of project at 
" + webappHome,
 new File(webappHome, "target/tomcat").exists());
 
 logger.info("Verifying context goals output");
 verifier.verifyTextInLog("OK - Deployed application at context path 
[/foo]");
-verifier.verifyTextInLog("OK - Undeployed application at context path 
[/foo]");
 verifier.verifyTextInLog("OK - Session information for application at 
context path [/foo]");
 verifier.verifyTextInLog("OK - Reloaded application at context path 
[/foo]");
 verifier.verifyTextInLog("OK - Stopped application at context path 
[/foo]");
diff --git 
a/src/test/resources/container-goals-test/src/main/tomcatconf/server.xml 
b/src/test/resources/container-goals-test/src/main/tomcatconf/server.xml
index 4a67442..a891c12 100644
--- a/src/test/resources/container-goals-test/src/main/tomcatconf/server.xml
+++ b/src/test/resources/container-goals-test/src/main/tomcatconf/server.xml
@@ -37,8 +37,7 @@
 buffered="false" />
 
-
+
 
 
diff --git a/src/test/resources/context-goals-test/pom.xml 
b/src/test/resources/context-goals-test/pom.xml
index 8f8f799..f8b3b80 100644
--- a/src/test/resources/context-goals-test/pom.xml
+++ b/src/test/resources/context-goals-test/pom.xml
@@ -64,6 +64,19 @@
 
src/main/tomcatconf/tomcat-users.xml
 
 
+
+tomcat-deploy
+integration-test
+
+deploy
+
+
+
http://localhost:${its.http.port}/manager
+tomcat
+tomcat
+/foo
+
+
 
 tomcat-context-goals
 integration-test
@@ -73,9 +86,6 @@
 start
 reload
 sessions
-redeploy
-undeploy
-deploy
 
 
 
http://localhost:${its.http.port}/manager
diff --git 
a/src/test/resources/context-goals-test/src/main/tomcatconf/server.xml 
b/src/test/resources/context-goals-test/src/main/tomcatconf/server.xml
index 4a67442..a891c12 100644
--- a/src/test/resources/context-goals-test/src/main/tomcatconf/server.xml
+++ b/src/test/resources/context-goals-test/src/main/tomcatconf/server.xml
@@ -37,8 +37,7 @@
 buffered="false" />
 
-
+
 
 
diff --git 
a/src/test/resources/deploy

(tomcat-maven-plugin) branch trunk updated: Fix tests

2026-04-14 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/tomcat-maven-plugin.git


The following commit(s) were added to refs/heads/trunk by this push:
 new e81d379  Fix tests
e81d379 is described below

commit e81d379d233aa145d22ba7487273028cce8b1c36
Author: remm 
AuthorDate: Tue Apr 14 17:10:44 2026 +0200

Fix tests
---
 pom.xml| 10 ++
 run-its.sh |  3 ++-
 .../org/apache/tomcat/maven/it/TomcatRunMultiConfigIT.java |  2 +-
 src/test/resources/tomcat-run-multi-config/pom.xml |  4 ++--
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 496f797..a921c26 100644
--- a/pom.xml
+++ b/pom.xml
@@ -352,6 +352,16 @@
 **/tomcat-run-multi-config/**
 **/Abstract*.java
 
+
+${project.version}
+
${verifier.maven.debug}
+
${verifier.debugJvm}
+${its.http.port}
+${its.https.port}
+${its.ajp.port}
+
${its.server.port}
+
${project.build.directory}
+
 
 
 
diff --git a/run-its.sh b/run-its.sh
index f04d7ee..0ab740d 100755
--- a/run-its.sh
+++ b/run-its.sh
@@ -16,4 +16,5 @@
 # under the License.
 
 export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED 
--add-opens=java.base/java.util.zip=ALL-UNNAMED 
--add-opens=java.base/java.io=ALL-UNNAMED 
--add-opens=java.base/java.lang=ALL-UNNAMED 
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED 
--add-opens=java.base/java.net=ALL-UNNAMED 
--add-opens=java.base/java.nio=ALL-UNNAMED 
--add-opens=java.base/java.nio.channels=ALL-UNNAMED 
--add-opens=java.base/java.text=ALL-UNNAMED 
--add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java. [...]
-mvn install -Prun-its -DskipTests "$@"
+mvn clean install -Prun-its -DskipTests "$@"
+mvn failsafe:integration-test
diff --git 
a/src/test/java/org/apache/tomcat/maven/it/TomcatRunMultiConfigIT.java 
b/src/test/java/org/apache/tomcat/maven/it/TomcatRunMultiConfigIT.java
index 4a863dd..c7f2326 100644
--- a/src/test/java/org/apache/tomcat/maven/it/TomcatRunMultiConfigIT.java
+++ b/src/test/java/org/apache/tomcat/maven/it/TomcatRunMultiConfigIT.java
@@ -31,7 +31,7 @@ public class TomcatRunMultiConfigIT
 throws VerificationException
 {
 verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-nio-" 
+ getHttpItPort() + "\"]");
-verifier.verifyTextInLog("INFO: Starting ProtocolHandler [\"http-nio-" 
+ getHttpsItPort() + "\"]");
+verifier.verifyTextInLog("INFO: Starting ProtocolHandler 
[\"https-jsse-nio-" + getHttpsItPort() + "\"]");
 verifier.verifyTextInLog("INFO: Starting ProtocolHandler 
[\"ajp-nio-127.0.0.1-" + getAjpItPort() + "\"]");
 }
 }
diff --git a/src/test/resources/tomcat-run-multi-config/pom.xml 
b/src/test/resources/tomcat-run-multi-config/pom.xml
index d290ced..e360280 100644
--- a/src/test/resources/tomcat-run-multi-config/pom.xml
+++ b/src/test/resources/tomcat-run-multi-config/pom.xml
@@ -65,8 +65,8 @@
 
 pre-integration-test
 
-  
${basedir}/src/main/tcconf
-  
${project.build.directory}/tc
+  
src/main/tcconf
+  target/tc
   /multi-config
   ${its.http.port}
   ${its.https.port}


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]