Skip to content

Commit 39f6560

Browse files
committed
Reinstate more specific exception type
1 parent 9b0aa6e commit 39f6560

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/netty4/SimpleSecurityNetty4ServerTransportTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import io.netty.bootstrap.Bootstrap;
1010
import io.netty.channel.ChannelOption;
1111
import io.netty.channel.socket.nio.NioChannelOption;
12+
import io.netty.handler.ssl.SslHandshakeTimeoutException;
1213

1314
import org.apache.logging.log4j.Level;
1415
import org.apache.lucene.util.Constants;
@@ -99,7 +100,6 @@
99100
import javax.net.ssl.SNIServerName;
100101
import javax.net.ssl.SSLContext;
101102
import javax.net.ssl.SSLEngine;
102-
import javax.net.ssl.SSLHandshakeException;
103103
import javax.net.ssl.SSLParameters;
104104
import javax.net.ssl.SSLServerSocket;
105105
import javax.net.ssl.SSLServerSocketFactory;
@@ -955,7 +955,7 @@ private void runOutboundTlsHandshakeTimeoutTest(@Nullable /* to use the default
955955
exception = expectThrows(ExecutionException.class, ConnectTransportException.class, future::get); // long wait
956956
assertEquals("[][" + dummy.getAddress() + "] connect_exception", exception.getMessage());
957957
assertThat(
958-
asInstanceOf(SSLHandshakeException.class, exception.getCause()).getMessage(),
958+
asInstanceOf(SslHandshakeTimeoutException.class, exception.getCause()).getMessage(),
959959
equalTo("handshake timed out after " + handshakeTimeoutMillis + "ms")
960960
);
961961
}

0 commit comments

Comments
 (0)