org.apache.flink.shaded.netty4.io.netty.util.IllegalReferenceCountException Java Examples

The following examples show how to use org.apache.flink.shaded.netty4.io.netty.util.IllegalReferenceCountException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadBytesAfterRelease4() {
    ByteBuf buffer = buffer(8);
    try {
        releasedBuffer().readBytes(buffer, 0, 1);
    } finally {
        buffer.release();
    }
}
 
Example #2
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadBytesAfterRelease4() {
    ByteBuf buffer = buffer(8);
    try {
        releasedBuffer().readBytes(buffer, 0, 1);
    } finally {
        buffer.release();
    }
}
 
Example #3
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteBytesAfterRelease3() {
    ByteBuf buffer = buffer(8);
    try {
        releasedBuffer().writeBytes(buffer, 0, 1);
    } finally {
        buffer.release();
    }
}
 
Example #4
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test
public void testMemoryAddressAfterRelease() {
    ByteBuf buf = releasedBuffer();
    if (buf.hasMemoryAddress()) {
        try {
            buf.memoryAddress();
            fail();
        } catch (IllegalReferenceCountException e) {
            // expected
        }
    }
}
 
Example #5
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadBytesAfterRelease2() {
    ByteBuf buffer = buffer(8);
    try {
        releasedBuffer().readBytes(buffer);
    } finally {
        buffer.release();
    }
}
 
Example #6
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test
public void testArrayAfterRelease() {
    ByteBuf buf = releasedBuffer();
    if (buf.hasArray()) {
        try {
            buf.array();
            fail();
        } catch (IllegalReferenceCountException e) {
            // expected
        }
    }
}
 
Example #7
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetBytesAfterRelease2() {
    ByteBuf buffer = buffer();
    try {
        releasedBuffer().setBytes(0, buffer, 1);
    } finally {
        buffer.release();
    }
}
 
Example #8
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetBytesAfterRelease2() {
    ByteBuf buffer = buffer();
    try {
        releasedBuffer().setBytes(0, buffer, 1);
    } finally {
        buffer.release();
    }
}
 
Example #9
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadBytesAfterRelease3() {
    ByteBuf buffer = buffer(8);
    try {
        releasedBuffer().readBytes(buffer);
    } finally {
        buffer.release();
    }
}
 
Example #10
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteBytesAfterRelease2() {
    ByteBuf buffer = copiedBuffer(new byte[8]);
    try {
        releasedBuffer().writeBytes(buffer, 1);
    } finally {
        buffer.release();
    }
}
 
Example #11
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteShortLEAfterRelease() {
    releasedBuffer().writeShortLE(1);
}
 
Example #12
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetFloatAfterRelease() {
    releasedBuffer().setFloat(0, 1);
}
 
Example #13
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetZeroAfterRelease() {
    releasedBuffer().setZero(0, 1);
}
 
Example #14
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetIntAfterRelease() {
    releasedBuffer().setInt(0, 1);
}
 
Example #15
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteIntLEAfterRelease() {
    releasedBuffer().writeIntLE(1);
}
 
Example #16
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteBytesAfterRelease4() {
    releasedBuffer().writeBytes(new byte[8]);
}
 
Example #17
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadUnsignedIntAfterRelease() {
    releasedBuffer().readUnsignedInt();
}
 
Example #18
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadUnsignedIntLEAfterRelease() {
    releasedBuffer().readUnsignedIntLE();
}
 
Example #19
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadLongLEAfterRelease() {
    releasedBuffer().readLongLE();
}
 
Example #20
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testRetainedDuplicateAfterRelease() {
    releasedBuffer().retainedDuplicate();
}
 
Example #21
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testRetainedSliceAfterRelease() {
    releasedBuffer().retainedSlice();
}
 
Example #22
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadBytesAfterRelease() {
    releasedBuffer().readBytes(1);
}
 
Example #23
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testGetUnsignedIntLEAfterRelease() {
    releasedBuffer().getUnsignedIntLE(0);
}
 
Example #24
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testGetBytesAfterRelease6() {
    releasedBuffer().getBytes(0, ByteBuffer.allocate(8));
}
 
Example #25
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testSetUsAsciiCharSequenceAfterRelease() {
    testSetCharSequenceAfterRelease0(CharsetUtil.US_ASCII);
}
 
Example #26
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testGetFloatAfterRelease() {
    releasedBuffer().getFloat(0);
}
 
Example #27
Source File: AbstractByteBufTest.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteLongAfterRelease() {
    releasedBuffer().writeLong(1);
}
 
Example #28
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testGetBytesAfterRelease8() throws IOException {
    releasedBuffer().getBytes(0, new DevNullGatheringByteChannel(), 1);
}
 
Example #29
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testWriteBooleanAfterRelease() {
    releasedBuffer().writeBoolean(true);
}
 
Example #30
Source File: AbstractByteBufTest.java    From flink with Apache License 2.0 4 votes vote down vote up
@Test(expected = IllegalReferenceCountException.class)
public void testReadFloatLEAfterRelease() {
    releasedBuffer().readFloatLE();
}