Home / Function/ testCorruptedFrameException() — netty Function Reference

testCorruptedFrameException() — netty Function Reference

Architecture documentation for the testCorruptedFrameException() function in JsonObjectDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  476ebd76_18e3_96fa_4890_4c32bfdcfd42["testCorruptedFrameException()"]
  6e0a0e48_218c_0ee1_ac6e_2abf169a9f38["JsonObjectDecoderTest"]
  476ebd76_18e3_96fa_4890_4c32bfdcfd42 -->|defined in| 6e0a0e48_218c_0ee1_ac6e_2abf169a9f38
  style 476ebd76_18e3_96fa_4890_4c32bfdcfd42 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java lines 387–417

    @Test
    public void testCorruptedFrameException() {
        final String part1 = "{\"a\":{\"b\":{\"c\":{ \"d\":\"27301\", \"med\":\"d\", \"path\":\"27310\"} }," +
                " \"status\":\"OK\" } }{\"";
        final String part2 = "a\":{\"b\":{\"c\":{\"ory\":[{\"competi\":[{\"event\":[{" + "\"externalI\":{\"external\"" +
                ":[{\"id\":\"O\"} ]";

        EmbeddedChannel ch = new EmbeddedChannel(new JsonObjectDecoder());

        ByteBuf res;

        ch.writeInbound(Unpooled.copiedBuffer(part1, CharsetUtil.UTF_8));
        res = ch.readInbound();
        assertEquals("{\"a\":{\"b\":{\"c\":{ \"d\":\"27301\", \"med\":\"d\", \"path\":\"27310\"} }, " +
                "\"status\":\"OK\" } }", res.toString(CharsetUtil.UTF_8));
        res.release();

        ch.writeInbound(Unpooled.copiedBuffer(part2, CharsetUtil.UTF_8));
        res = ch.readInbound();

        assertNull(res);

        ch.writeInbound(Unpooled.copiedBuffer("}}]}]}]}}}}", CharsetUtil.UTF_8));
        res = ch.readInbound();

        assertEquals("{\"a\":{\"b\":{\"c\":{\"ory\":[{\"competi\":[{\"event\":[{" + "\"externalI\":{" +
                "\"external\":[{\"id\":\"O\"} ]}}]}]}]}}}}", res.toString(CharsetUtil.UTF_8));
        res.release();

        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testCorruptedFrameException() do?
testCorruptedFrameException() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java.
Where is testCorruptedFrameException() defined?
testCorruptedFrameException() is defined in codec-base/src/test/java/io/netty/handler/codec/json/JsonObjectDecoderTest.java at line 387.

Analyze Your Own Codebase

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

Try Supermodel Free