Cleanup SSL test. (#8301)
Motivation: I noticed that we had some errors showing up in a test (which did not fail it tho) because we tried to full-fill the promise multiples times. Modifications: Use trySuccess(...) as we may produce multiple exceptions. Result: Less errors during test-run.
This commit is contained in:
parent
01db30a163
commit
a80c49828f
@ -340,7 +340,7 @@ public class ParameterizedSslHandlerTest {
|
|||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
||||||
if (cause.getCause() instanceof SSLException) {
|
if (cause.getCause() instanceof SSLException) {
|
||||||
// We received the alert and so produce an SSLException.
|
// We received the alert and so produce an SSLException.
|
||||||
promise.setSuccess(null);
|
promise.trySuccess(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user