davsclaus commented on code in PR #27900:
URL: https://github.com/apache/camel/pull/27900#discussion_r4286189224


##########
components/camel-lumberjack/src/test/java/org/apache/camel/component/lumberjack/LumberjackUtil.java:
##########
@@ -74,14 +74,18 @@ protected void initChannel(Channel ch) throws Exception {
                         pipeline.addLast(new SslHandler(sslEngine));
                     }
 
-                    // Add the response recorder
+                    // Add the response recorder.
+                    // Each ACK frame is exactly 6 bytes: 1 version + 1 
type('A') + 4 sequence.
+                    // TCP may coalesce multiple ACKs into one ByteBuf, so 
drain all of them.
                     pipeline.addLast(new 
SimpleChannelInboundHandler<ByteBuf>() {
                         @Override
                         protected void channelRead0(ChannelHandlerContext ctx, 
ByteBuf msg) {
-                            assertEquals(msg.readUnsignedByte(), (short) '2');
-                            assertEquals(msg.readUnsignedByte(), (short) 'A');
-                            synchronized (responses) {
-                                responses.add(msg.readInt());
+                            while (msg.readableBytes() >= 6) {

Review Comment:
   Fixed in 50e0aa5b51, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to