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 08383d4838 Fix running test standalone
08383d4838 is described below

commit 08383d48381467e1808a886dc9e73a82bb6fa167
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 20 12:27:17 2026 +0000

    Fix running test standalone
---
 .../tribes/group/TestGroupChannelTlsFFM.java       | 27 +++++++++++-----------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java 
b/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
index 3be8ecfe1b..df6c1036e3 100644
--- a/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
+++ b/test/org/apache/catalina/tribes/group/TestGroupChannelTlsFFM.java
@@ -32,21 +32,22 @@ public class TestGroupChannelTlsFFM extends 
GroupChannelTlsTestBase {
     @Before
     public void setup() throws Exception {
         Assume.assumeTrue("FFM requires Java 22+", 
JreCompat.isJre22Available());
-        Assume.assumeTrue("TLS-PSK support requires OpenSSL", 
OpenSSLStatus.isOpenSSL3());
-        if (explicit) {
-            // Models starting cluster when OpenSSLLifecycleListener has 
configured FFM support.
+        try {
             openSSLLibraryInit();
-            Assume.assumeTrue(OpenSSLStatus.isAvailable());
-        } else {
-            // Test FFM is available but leave it uninitialized so Tribes 
performs initialization
-            try {
-                openSSLLibraryInit();
-            } catch (Throwable t) {
-                ExceptionUtils.handleThrowable(t);
-                // Ignore
+        } catch (Throwable t) {
+            ExceptionUtils.handleThrowable(t);
+            // Ignore
+        }
+        try {
+            // Need to check both as only available is reset with init/destroy
+            Assume.assumeTrue("TLS-PSK support requires OpenSSL", 
OpenSSLStatus.isAvailable());
+            Assume.assumeTrue("TLS-PSK support requires OpenSSL 3", 
OpenSSLStatus.isOpenSSL3());
+        } finally {
+            if (!explicit || !OpenSSLStatus.isOpenSSL3()) {
+                // If not explicit, leave OpenSSL-FFM uninitialized so Tribes 
performs initialization.
+                // Clean-up if not OpenSSL 3
+                openSSLLibraryDestroy();
             }
-            Assume.assumeTrue(OpenSSLStatus.isAvailable());
-            openSSLLibraryDestroy();
         }
     }
 


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

Reply via email to