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:
parent
2d714c247a
commit
b2dbd4cedf
@ -370,10 +370,12 @@ public class SniHandlerTest {
|
|||||||
|
|
||||||
ch.close();
|
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();
|
ByteBuf buf = ch.readOutbound();
|
||||||
if (buf != null) {
|
if (buf == null) {
|
||||||
assertFalse(buf.isReadable());
|
break;
|
||||||
|
}
|
||||||
buf.release();
|
buf.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user