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
0bd8771697
commit
9a558f1be9
@ -1095,13 +1095,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