Search in sources :

Example 11 with IllegalReferenceCountException

use of io.netty.util.IllegalReferenceCountException in project flink by apache.

the class AbstractByteBufTest method testArrayAfterRelease.

@Test
public void testArrayAfterRelease() {
    ByteBuf buf = releasedBuffer();
    if (buf.hasArray()) {
        try {
            buf.array();
            fail();
        } catch (IllegalReferenceCountException e) {
        // expected
        }
    }
}
Also used : IllegalReferenceCountException(org.apache.flink.shaded.netty4.io.netty.util.IllegalReferenceCountException) ByteBuf(org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf) Test(org.junit.Test)

Aggregations

ByteBuf (org.apache.flink.shaded.netty4.io.netty.buffer.ByteBuf)6 IllegalReferenceCountException (org.apache.flink.shaded.netty4.io.netty.util.IllegalReferenceCountException)6 IllegalReferenceCountException (io.netty.util.IllegalReferenceCountException)5 Test (org.junit.Test)5 DrillBuf (io.netty.buffer.DrillBuf)2 Channel (io.netty.channel.Channel)1 ChannelHandlerContext (io.netty.channel.ChannelHandlerContext)1 ChannelInboundHandlerAdapter (io.netty.channel.ChannelInboundHandlerAdapter)1 ChannelInitializer (io.netty.channel.ChannelInitializer)1 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 LocalChannel (io.netty.channel.local.LocalChannel)1 LocalServerChannel (io.netty.channel.local.LocalServerChannel)1 NioServerSocketChannel (io.netty.channel.socket.nio.NioServerSocketChannel)1 NioSocketChannel (io.netty.channel.socket.nio.NioSocketChannel)1 CodecException (io.netty.handler.codec.CodecException)1 ClientConfiguration (org.apache.bookkeeper.conf.ClientConfiguration)1 BaseTest (org.apache.drill.test.BaseTest)1