You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/01/14 10:59:45 UTC

(tomcat) branch 11.0.x updated: Fix a test failure found by BuildBot

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

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

commit b60a56bfbbc0f4753fa12d2eccbbfd8b81ef491f
Author: Mark Thomas <ma...@apache.org>
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org