maskit commented on code in PR #11611:
URL: https://github.com/apache/trafficserver/pull/11611#discussion_r1690342863


##########
src/proxy/http3/test/test_Http3FrameDispatcher.cc:
##########
@@ -59,9 +59,32 @@ TEST_CASE("Http3FrameHandler dispatch", "[http3]")
     CHECK(!error);
     CHECK(handler.total_frame_received == 1);
     CHECK(nread == 12);
+  }
 
-    free_MIOBuffer(buf);
+  SECTION("Test good case with a multibyte frame type encoding")
+  {
+    uint8_t input[] = {// 1st frame (HEADERS)
+                       0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 
0x11, 0x22, 0x33, 0x44,
+                       // 2nd frame (reserved)
+                       0x80, 0xbc, 0x00,
+                       // 3rd frame (DATA)
+                       0x00, 0x04, 0xaa, 0xbb, 0xcc, 0xdd,
+                       // 4th frame (incomplete)
+                       0xff};
+
+    buf->write(input, sizeof(input));
+
+    // Initial state
+    CHECK(handler.total_frame_received == 0);
+    CHECK(nread == 0);
+
+    error = http3FrameDispatcher.on_read_ready(0, Http3StreamType::UNKNOWN, 
*reader, nread);
+    CHECK(!error);
+    CHECK(handler.total_frame_received == 0);

Review Comment:
   Shouldn't this be 1?



-- 
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