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 e18198ffc3 Fix potential test failure
e18198ffc3 is described below

commit e18198ffc3ca6ea0623e94f435f1c552885b3bd4
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jan 19 15:53:07 2026 +0000

    Fix potential test failure
---
 test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java 
b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
index fe0d28390d..290b08822a 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspTimeout.java
@@ -16,6 +16,7 @@
  */
 package org.apache.tomcat.util.net.ocsp;
 
+import java.net.SocketException;
 import java.net.SocketTimeoutException;
 
 import javax.net.ssl.SSLHandshakeException;
@@ -64,9 +65,9 @@ public class TestOcspTimeout extends OcspBaseTest {
     public void testTimeoutWithoutSoftFail() throws Exception {
         try {
             doTest(false, false, ClientCertificateVerification.ENABLED, false, 
Boolean.FALSE);
-        } catch (SocketTimeoutException ste) {
-            // May throw a SocketTimeoutException rather than a 
SSLHandshakeException
-            throw new SSLHandshakeException(ste.getMessage());
+        } catch (SocketTimeoutException | SocketException e) {
+            // May throw a SocketTimeoutException or SocketException rather 
than a SSLHandshakeException
+            throw new SSLHandshakeException(e.getMessage());
         }
     }
 }


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

Reply via email to