Home / Function/ testOverflowWhileUseConstructorWithOffset() — netty Function Reference

testOverflowWhileUseConstructorWithOffset() — netty Function Reference

Architecture documentation for the testOverflowWhileUseConstructorWithOffset() function in AbstractCompositeByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6c9f2978_ae82_ff2b_8231_0c9d9e02aed6["testOverflowWhileUseConstructorWithOffset()"]
  47bc0a20_e243_89ff_132b_99ac6b23835f["AbstractCompositeByteBufTest"]
  6c9f2978_ae82_ff2b_8231_0c9d9e02aed6 -->|defined in| 47bc0a20_e243_89ff_132b_99ac6b23835f
  2b9d825e_3872_7ca7_6fa2_43af2b5c9ac8["CompositeByteBuf()"]
  6c9f2978_ae82_ff2b_8231_0c9d9e02aed6 -->|calls| 2b9d825e_3872_7ca7_6fa2_43af2b5c9ac8
  style 6c9f2978_ae82_ff2b_8231_0c9d9e02aed6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java lines 1718–1740

    @Test
    public void testOverflowWhileUseConstructorWithOffset() {
        int capacity = 1024 * 1024; // 1MB
        final ByteBuf buffer = Unpooled.buffer(capacity).writeZero(capacity);
        final List<ByteBuf> buffers = new ArrayList<ByteBuf>();
        for (long i = 0; i <= Integer.MAX_VALUE; i += capacity) {
            buffers.add(buffer.duplicate());
        }
        // Add one more
        buffers.add(buffer.duplicate());

        try {
            assertThrows(IllegalArgumentException.class, new Executable() {
                @Override
                public void execute() {
                    ByteBuf[] bufferArray = buffers.toArray(new ByteBuf[0]);
                    new CompositeByteBuf(ALLOC, false, Integer.MAX_VALUE, bufferArray, 0);
                }
            });
        } finally {
            buffer.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testOverflowWhileUseConstructorWithOffset() do?
testOverflowWhileUseConstructorWithOffset() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java.
Where is testOverflowWhileUseConstructorWithOffset() defined?
testOverflowWhileUseConstructorWithOffset() is defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java at line 1718.
What does testOverflowWhileUseConstructorWithOffset() call?
testOverflowWhileUseConstructorWithOffset() calls 1 function(s): CompositeByteBuf.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free