Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第9章测试代码注释纠错 #104

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void testFramesDecoded() {
}
ByteBuf input = buf.duplicate();

//创建一个 EmbeddedChannel,并向其安装一个帧大小为 3 字节的 FixedLengthFrameDecoder
//创建一个 EmbeddedChannel,并向其安装一个帧大小为 3 字节的 FrameChunkDecoder
EmbeddedChannel channel = new EmbeddedChannel(
new FrameChunkDecoder(3));

Expand All @@ -40,7 +40,7 @@ public void testFramesDecoded() {
} catch (TooLongFrameException e) {
// expected exception
}
//写入剩余的2字节,并断言将会产生一个有效帧
//写入剩余的 3 字节,并断言将会产生一个有效帧
assertTrue(channel.writeInbound(input.readBytes(3)));
//将该 Channel 标记为已完成状态
assertTrue(channel.finish());
Expand Down