Skip to content

Commit

Permalink
Merge pull request #104 from mwwcdk/ChineseVersion
Browse files Browse the repository at this point in the history
第9章测试代码注释纠错
  • Loading branch information
He-Pin authored Aug 27, 2023
2 parents 5fda9f8 + 36af7bb commit e42e8d5
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit e42e8d5

Please sign in to comment.