diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-12-13 12:48:13 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-12-13 12:48:13 +0100 |
commit | 01876fee419d8d52a66ca7eb2f8724085d37ea9b (patch) | |
tree | 43ad939287fdf5c79a63c7efd6627de8fa365637 /container-core | |
parent | 008d645e70f406b168b54ebc343244099b3393b4 (diff) |
Broken pipe can be reported through SocketException
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java index ef3e52304c6..677fb2dbf6d 100644 --- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java +++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/SslHandshakeMetricsTest.java @@ -11,6 +11,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; import java.io.IOException; +import java.net.SocketException; import java.nio.file.Path; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -169,7 +170,7 @@ class SslHandshakeMetricsTest { fail("SSLHandshakeException expected"); } catch (SSLHandshakeException e) { assertThat(e.getMessage()).contains(expectedExceptionSubstring); - } catch (SSLException e) { + } catch (SocketException | SSLException e) { // This exception is thrown if Apache httpclient's write thread detects the handshake failure before the read thread. log.log(Level.WARNING, "Client failed to get a proper TLS handshake response: " + e.getMessage(), e); // Only ignore a subset of exceptions |