This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new ce504d80f3 Fix a test failure found by BuildBot
ce504d80f3 is described below

commit ce504d80f3affd08fd3a185281923c8367356988
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jan 14 11:05:57 2026 +0000

    Fix a test failure found by BuildBot
---
 test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java 
b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
index e3034ac956..4cdb9fafbb 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
@@ -16,6 +16,8 @@
  */
 package org.apache.tomcat.util.net.ocsp;
 
+import java.net.SocketTimeoutException;
+
 import javax.net.ssl.SSLHandshakeException;
 
 import org.junit.AfterClass;
@@ -60,6 +62,16 @@ public class TestOcspTimeout extends OcspBaseTest {
 
     @Test(expected = SSLHandshakeException.class)
     public void testTimeoutWithoutSoftFail() throws Exception {
-        doTest(false, false, ClientCertificateVerification.ENABLED, false, 
Boolean.FALSE);
+        try {
+            doTest(false, false, ClientCertificateVerification.ENABLED, false, 
Boolean.FALSE);
+        } catch (SocketTimeoutException ste) {
+            // NIO2 may throw a SocketTimeoutException rather than a 
SSLHandshakeException
+            if 
(getTomcatInstance().getConnector().getProtocolHandlerClassName().contains("Nio2"))
 {
+                throw new SSLHandshakeException(ste.getMessage());
+            } else {
+                throw ste;
+            }
+        }
+
     }
 }


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

Reply via email to