From a80c49828f8d52b70e68b8a4c80f677ca44af0af Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 21 Sep 2018 08:04:24 -0700 Subject: [PATCH] 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. --- .../java/io/netty/handler/ssl/ParameterizedSslHandlerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/src/test/java/io/netty/handler/ssl/ParameterizedSslHandlerTest.java b/handler/src/test/java/io/netty/handler/ssl/ParameterizedSslHandlerTest.java index 813e599372..2abc33e8a3 100644 --- a/handler/src/test/java/io/netty/handler/ssl/ParameterizedSslHandlerTest.java +++ b/handler/src/test/java/io/netty/handler/ssl/ParameterizedSslHandlerTest.java @@ -340,7 +340,7 @@ public class ParameterizedSslHandlerTest { public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { if (cause.getCause() instanceof SSLException) { // We received the alert and so produce an SSLException. - promise.setSuccess(null); + promise.trySuccess(null); } } });