testResponseZstdDecompression() — netty Function Reference
Architecture documentation for the testResponseZstdDecompression() function in HttpContentDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0ab73bef_6ed7_a8e0_f505_22a5c279fdff["testResponseZstdDecompression()"] ea4ec426_b689_ab52_a554_7959aed6c709["HttpContentDecoderTest"] 0ab73bef_6ed7_a8e0_f505_22a5c279fdff -->|defined in| ea4ec426_b689_ab52_a554_7959aed6c709 e1fd631d_8d14_d190_2463_40108ec003a4["assertHasInboundMessages()"] 0ab73bef_6ed7_a8e0_f505_22a5c279fdff -->|calls| e1fd631d_8d14_d190_2463_40108ec003a4 465668ef_fec3_d4d9_164f_24dc020645ba["assertHasOutboundMessages()"] 0ab73bef_6ed7_a8e0_f505_22a5c279fdff -->|calls| 465668ef_fec3_d4d9_164f_24dc020645ba style 0ab73bef_6ed7_a8e0_f505_22a5c279fdff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java lines 282–307
@Test
public void testResponseZstdDecompression() throws Throwable {
HttpResponseDecoder decoder = new HttpResponseDecoder();
HttpContentDecoder decompressor = new HttpContentDecompressor(0);
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
EmbeddedChannel channel = new EmbeddedChannel(decoder, decompressor, aggregator);
String headers = "HTTP/1.1 200 OK\r\n" +
"Content-Length: " + SAMPLE_ZSTD_BYTES.length + "\r\n" +
"Content-Encoding: zstd\r\n" +
"\r\n";
ByteBuf buf = Unpooled.wrappedBuffer(headers.getBytes(CharsetUtil.US_ASCII), SAMPLE_ZSTD_BYTES);
assertTrue(channel.writeInbound(buf));
Object o = channel.readInbound();
assertInstanceOf(FullHttpResponse.class, o);
FullHttpResponse resp = (FullHttpResponse) o;
assertNull(resp.headers().get(HttpHeaderNames.CONTENT_ENCODING), "Content-Encoding header should be removed");
assertEquals(SAMPLE_STRING, resp.content().toString(CharsetUtil.UTF_8),
"Response body should match uncompressed string");
resp.release();
assertHasInboundMessages(channel, false);
assertHasOutboundMessages(channel, false);
assertFalse(channel.finish()); // assert that no messages are left in channel
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testResponseZstdDecompression() do?
testResponseZstdDecompression() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java.
Where is testResponseZstdDecompression() defined?
testResponseZstdDecompression() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentDecoderTest.java at line 282.
What does testResponseZstdDecompression() call?
testResponseZstdDecompression() calls 2 function(s): assertHasInboundMessages, assertHasOutboundMessages.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free