Update test to directly check for SslHandshakeTimeoutException (#10339)
Motivation:
9b7e091
added a special SSLHandshakeException sub-class to signal handshake timeouts but we missed to update a testcase to directly assert the type of the exception.
Modifications:
Assert directly that SslHandshakeTimeoutException is used
Result:
Test cleanup
This commit is contained in:
parent
8bbd89d72a
commit
feeb3ee920
@ -1069,13 +1069,11 @@ public class SslHandlerTest {
|
||||
|
||||
if (client) {
|
||||
Throwable cause = clientSslHandler.handshakeFuture().await().cause();
|
||||
assertThat(cause, CoreMatchers.<Throwable>instanceOf(SSLException.class));
|
||||
assertThat(cause.getMessage(), containsString("timed out"));
|
||||
assertThat(cause, CoreMatchers.<Throwable>instanceOf(SslHandshakeTimeoutException.class));
|
||||
assertFalse(serverSslHandler.handshakeFuture().await().isSuccess());
|
||||
} else {
|
||||
Throwable cause = serverSslHandler.handshakeFuture().await().cause();
|
||||
assertThat(cause, CoreMatchers.<Throwable>instanceOf(SSLException.class));
|
||||
assertThat(cause.getMessage(), containsString("timed out"));
|
||||
assertThat(cause, CoreMatchers.<Throwable>instanceOf(SslHandshakeTimeoutException.class));
|
||||
assertFalse(clientSslHandler.handshakeFuture().await().isSuccess());
|
||||
}
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user