testFrameEncodedAndDecoded() — netty Function Reference
Architecture documentation for the testFrameEncodedAndDecoded() function in Http3FrameCodecTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169["testFrameEncodedAndDecoded()"] 5690f307_9248_ec29_2c84_6839dbcdc179["Http3FrameCodecTest"] b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 -->|defined in| 5690f307_9248_ec29_2c84_6839dbcdc179 9adc46ad_fff8_23d3_d4a6_572d810a74e0["testHttp3CancelPushFrame_63()"] 9adc46ad_fff8_23d3_d4a6_572d810a74e0 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 64fed699_44f9_642e_abd7_f5203d81ef3c["testHttp3CancelPushFrame_16383()"] 64fed699_44f9_642e_abd7_f5203d81ef3c -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 5e5e56d5_6f40_8539_5b9e_c5c1f1581718["testHttp3CancelPushFrame_1073741823()"] 5e5e56d5_6f40_8539_5b9e_c5c1f1581718 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 50df1a1a_30f3_de60_11cc_f002075ab688["testHttp3CancelPushFrame_4611686018427387903()"] 50df1a1a_30f3_de60_11cc_f002075ab688 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 49b3a2c3_389b_18e8_70b9_94c4955edcd4["testHttp3DataFrame()"] 49b3a2c3_389b_18e8_70b9_94c4955edcd4 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 b3abc623_cf1c_26ad_f744_1ed740cf27e9["testHttp3GoAwayFrame_63()"] b3abc623_cf1c_26ad_f744_1ed740cf27e9 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 a87a61fb_0d3a_f48c_f5e9_c0e5ddd2e896["testHttp3GoAwayFrame_16383()"] a87a61fb_0d3a_f48c_f5e9_c0e5ddd2e896 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 c0d8b342_34f5_db12_6631_a98ee325a4a4["testHttp3GoAwayFrame_1073741823()"] c0d8b342_34f5_db12_6631_a98ee325a4a4 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 0d2bc214_9c55_e364_62ee_7fb451c95fde["testHttp3MaxPushIdFrame_63()"] 0d2bc214_9c55_e364_62ee_7fb451c95fde -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 f11589b4_8f9d_dc0e_94de_19597f0c6883["testHttp3MaxPushIdFrame_16383()"] f11589b4_8f9d_dc0e_94de_19597f0c6883 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 dfd4d541_abef_b6bb_a061_1661967647a5["testHttp3MaxPushIdFrame_1073741823()"] dfd4d541_abef_b6bb_a061_1661967647a5 -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 c4d16b9a_402f_ba6b_949e_77c11bb4803d["testHttp3SettingsFrame()"] c4d16b9a_402f_ba6b_949e_77c11bb4803d -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 fc310149_9a44_5921_5e79_c1eb5e8637be["testHttp3HeadersFrame()"] fc310149_9a44_5921_5e79_c1eb5e8637be -->|calls| b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 style b1ff5de9_9ca0_35d9_9bc2_5d0d9a917169 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameCodecTest.java lines 608–668
private void testFrameEncodedAndDecoded(
boolean fragmented, int maxBlockedStreams, boolean delayQpackStreams, Http3Frame frame) throws Exception {
final boolean isDataFrame = frame instanceof Http3DataFrame;
final boolean isHeaderFrame = frameContainsHeaders(frame);
encodeFrame(delayQpackStreams, frame, isHeaderFrame);
if (isWriteBuffered(delayQpackStreams, isHeaderFrame)) {
setQpackStreams();
codecChannel.checkException();
}
ByteBuf buffer = codecChannel.readOutbound();
if (fragmented) {
try {
do {
ByteBuf slice = buffer.readRetainedSlice(
ThreadLocalRandom.current().nextInt(buffer.readableBytes() + 1));
boolean producedData = codecChannel.writeInbound(slice);
if (!isDataFrame) {
if (buffer.isReadable() || (isHeaderFrame && maxBlockedStreams > 0)) {
assertFalse(producedData);
} else {
assertTrue(producedData);
}
}
} while (buffer.isReadable());
} catch (Exception e) {
if (isDataFrame) {
ReferenceCountUtil.release(frame);
}
throw e;
} finally {
buffer.release();
}
} else {
if (maxBlockedStreams > 0 && isHeaderFrame) {
assertFalse(codecChannel.writeInbound(buffer));
} else {
assertTrue(codecChannel.writeInbound(buffer));
}
}
relayQPACKEncoderInstructions();
final Http3Frame actualFrame;
if (isDataFrame) {
CompositeByteBuf composite = Unpooled.compositeBuffer();
for (;;) {
Http3DataFrame dataFrame = codecChannel.readInbound();
if (dataFrame == null) {
break;
}
composite.addComponent(true, dataFrame.content());
}
actualFrame = new DefaultHttp3DataFrame(composite);
} else {
actualFrame = codecChannel.readInbound();
}
Http3TestUtils.assertFrameEquals(frame, actualFrame);
}
Domain
Subdomains
Calls
Called By
- testHttp3CancelPushFrame_1073741823()
- testHttp3CancelPushFrame_16383()
- testHttp3CancelPushFrame_4611686018427387903()
- testHttp3CancelPushFrame_63()
- testHttp3DataFrame()
- testHttp3GoAwayFrame_1073741823()
- testHttp3GoAwayFrame_16383()
- testHttp3GoAwayFrame_63()
- testHttp3HeadersFrame()
- testHttp3HeadersFrameWithInvalidTrailers()
- testHttp3HeadersFrameWithTrailers()
- testHttp3MaxPushIdFrame_1073741823()
- testHttp3MaxPushIdFrame_16383()
- testHttp3MaxPushIdFrame_63()
- testHttp3PushPromiseFrame()
- testHttp3SettingsFrame()
- testHttp3UnknownFrame()
- testMultipleFramesEncodedAndDecodedInOneBufferPushPromise()
- testMultipleHttp3PushPromiseFrame()
- testMultipleHttp3PushPromiseFrameWithInvalidHeaders()
Source
Frequently Asked Questions
What does testFrameEncodedAndDecoded() do?
testFrameEncodedAndDecoded() is a function in the netty codebase, defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameCodecTest.java.
Where is testFrameEncodedAndDecoded() defined?
testFrameEncodedAndDecoded() is defined in codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameCodecTest.java at line 608.
What does testFrameEncodedAndDecoded() call?
testFrameEncodedAndDecoded() calls 5 function(s): encodeFrame, frameContainsHeaders, isWriteBuffered, relayQPACKEncoderInstructions, setQpackStreams.
What calls testFrameEncodedAndDecoded()?
testFrameEncodedAndDecoded() is called by 20 function(s): testHttp3CancelPushFrame_1073741823, testHttp3CancelPushFrame_16383, testHttp3CancelPushFrame_4611686018427387903, testHttp3CancelPushFrame_63, testHttp3DataFrame, testHttp3GoAwayFrame_1073741823, testHttp3GoAwayFrame_16383, testHttp3GoAwayFrame_63, and 12 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free