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 8177707b9f Improve test reliability
8177707b9f is described below
commit 8177707b9fdd51c9152487f88f187b6ac1d8ba0a
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Mar 30 14:03:55 2026 +0100
Improve test reliability
---
test/org/apache/tomcat/util/net/ocsp/TestOcspEnabled.java | 3 ++-
.../org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java | 3 ++-
test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailTryLater.java | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspEnabled.java
b/test/org/apache/tomcat/util/net/ocsp/TestOcspEnabled.java
index df96e97e0a..39b2028dcd 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspEnabled.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspEnabled.java
@@ -16,6 +16,7 @@
*/
package org.apache.tomcat.util.net.ocsp;
+import java.net.SocketException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -111,7 +112,7 @@ public class TestOcspEnabled extends OcspBaseTest {
if (handshakeFailureExpected) {
Assert.fail("Handshake did not fail when expected to do so.");
}
- } catch (SSLHandshakeException e) {
+ } catch (SSLHandshakeException | SocketException e) {
if (!handshakeFailureExpected) {
Assert.fail("Handshake failed when not expected to do so.");
}
diff --git
a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
index ff44881cdc..16cb573aa9 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
@@ -16,6 +16,7 @@
*/
package org.apache.tomcat.util.net.ocsp;
+import java.net.SocketException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -101,7 +102,7 @@ public class TestOcspSoftFailInternalError extends
OcspBaseTest {
if (handshakeFailureExpected) {
Assert.fail("Handshake did not fail when expected to do so.");
}
- } catch (SSLHandshakeException e) {
+ } catch (SSLHandshakeException | SocketException e) {
if (!handshakeFailureExpected) {
Assert.fail("Handshake failed when not expected to do so.");
}
diff --git a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailTryLater.java
b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailTryLater.java
index 23fff507b5..3bf148d32e 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailTryLater.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailTryLater.java
@@ -16,6 +16,7 @@
*/
package org.apache.tomcat.util.net.ocsp;
+import java.net.SocketException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -101,7 +102,7 @@ public class TestOcspSoftFailTryLater extends OcspBaseTest {
if (handshakeFailureExpected) {
Assert.fail("Handshake did not fail when expected to do so.");
}
- } catch (SSLHandshakeException e) {
+ } catch (SSLHandshakeException | SocketException e) {
if (!handshakeFailureExpected) {
Assert.fail("Handshake failed when not expected to do so.");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]