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 committed by GitHub
parent 125cd9552d
commit f8d5871567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,10 +368,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();
}