Don't depend on implementation details of SSLEngine in SniHandlerTest (#10037)

Motivation:

In SniHandlerTest we depended on implementation details of the SSLEngine. We should better not doing this

Modifications:

Just release all outbound data

Result:

Dont depend on implementation details
This commit is contained in:
Norman Maurer 2020-02-18 15:05:15 +01:00
parent 2d714c247a
commit b2dbd4cedf

View File

@ -370,10 +370,12 @@ public class SniHandlerTest {
ch.close();
// When the channel is closed the SslHandler will write an empty buffer to the channel.
// Consume all the outbound data that may be produced by the SSLEngine.
for (;;) {
ByteBuf buf = ch.readOutbound();
if (buf != null) {
assertFalse(buf.isReadable());
if (buf == null) {
break;
}
buf.release();
}