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 6b90c06ee9 Fix some unintentionally skipped tests
6b90c06ee9 is described below
commit 6b90c06ee952553a5542ebb6b0b9b39f9b6dcf8f
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jun 19 10:10:25 2026 +0100
Fix some unintentionally skipped tests
---
test/org/apache/catalina/util/TestServerInfo.java | 26 +++++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/test/org/apache/catalina/util/TestServerInfo.java
b/test/org/apache/catalina/util/TestServerInfo.java
index 5e4a8315fe..ee8a3c78f0 100644
--- a/test/org/apache/catalina/util/TestServerInfo.java
+++ b/test/org/apache/catalina/util/TestServerInfo.java
@@ -212,11 +212,15 @@ public class TestServerInfo {
*/
@Test
public void testServerInfoOutputWithApr() throws Exception {
- // Only run this test if APR is available
- Assume.assumeTrue("APR not available",
AprLifecycleListener.isAprAvailable());
-
String output = captureServerInfoOutput();
+ /*
+ * APR is not initialised (if present) until the version info is
captured. Therefore, this test needs to made
+ * after the Server info has been collected.
+ */
+ // Only run this test if APR is available - only know this after
ServerInfo has nee
+ Assume.assumeTrue("APR not available",
AprLifecycleListener.isAprAvailable());
+
// Check for APR-specific output
Assert.assertTrue("Should contain 'APR loaded: true'",
output.contains("APR loaded: true"));
Assert.assertTrue("Should contain APR Version", output.contains("APR
Version:"));
@@ -276,11 +280,14 @@ public class TestServerInfo {
*/
@Test
public void testAprVersionInfo() throws Exception {
- // Only run if APR is available
- Assume.assumeTrue("APR not available",
AprLifecycleListener.isAprAvailable());
-
String output = captureServerInfoOutput();
+ /*
+ * APR is not initialised (if present) until the version info is
captured. Therefore, this test needs to made
+ * after the Server info has been collected.
+ */
+ Assume.assumeTrue("APR not available",
AprLifecycleListener.isAprAvailable());
+
// Verify version info format (should contain version numbers)
String[] lines = output.split("\n");
boolean foundAprVersion = false;
@@ -313,7 +320,12 @@ public class TestServerInfo {
*/
@Test
public void testTomcatNativeVersionWarningWithRealVersion() throws
Exception {
- // Only run if APR is available
+ captureServerInfoOutput();
+
+ /*
+ * APR is not initialised (if present) until the version info is
captured. Therefore, this test needs to made
+ * after the Server info has been collected.
+ */
Assume.assumeTrue("APR not available",
AprLifecycleListener.isAprAvailable());
// If APR is available, getTcnVersionWarning() should return non-null
if version is old,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]