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

markt 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 c02f062f9a Fix a test failure found by BuildBot
c02f062f9a is described below

commit c02f062f9ae0a3e67c82796184e8e33300ae5494
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jan 14 10:58:32 2026 +0000

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

diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java 
b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
index 7252f9de7e..382db3838b 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFail.java
@@ -16,6 +16,8 @@
  */
 package org.apache.tomcat.util.net.ocsp;
 
+import java.net.SocketException;
+
 import javax.net.ssl.SSLHandshakeException;
 
 import org.junit.Test;
@@ -43,6 +45,15 @@ public class TestOcspSoftFail extends OcspBaseTest {
 
     @Test(expected = SSLHandshakeException.class)
     public void testNoResponderWithoutSoftFail() throws Exception {
-        doTest(false, false, ClientCertificateVerification.ENABLED, false, 
Boolean.FALSE);
+        try {
+            doTest(false, false, ClientCertificateVerification.ENABLED, false, 
Boolean.FALSE);
+        } catch (SocketException se) {
+            // NIO2 may throw a SocketException rather than a 
SSLHandshakeException
+            if 
(getTomcatInstance().getConnector().getProtocolHandlerClassName().contains("Nio2"))
 {
+                throw new SSLHandshakeException(se.getMessage());
+            } else {
+                throw se;
+            }
+        }
     }
 }


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

Reply via email to