brbzull0 opened a new pull request, #13632: URL: https://github.com/apache/trafficserver/pull/13632
`Http3StreamDataVIOAdaptor` has no unit test. Its `finalize()` drain is currently exercised only indirectly, through the `h3_*` autests, which need a full QUIC stack and so do not run in configurations without a QUIC backend. This adds a catch2 case, `Http3StreamDataVIOAdaptor delivers a multi-frame body intact`, which builds an adaptor over a sink VIO, pushes a body across several DATA frames through `handle_frame()`, calls `finalize()`, and asserts the sink received the whole body -- both `sink_reader->read_avail()` and `sink_vio.nbytes`. This is test-only. No production behaviour changes. The drain itself is already correct on master: `3076c17172` (#13213) anchors `_reader` in the constructor, before any payload is written, so `finalize()` drains the buffer from its head rather than from whatever block is current. The test is a real regression test for that behaviour, not a tautology. Changing `finalize()` to allocate its reader at finalize time instead of using the anchored `_reader` reproduces the pre-`3076c17172` shape, and the test then fails on both assertions with `50 == 200` -- only the last block's worth of a 200-byte body reaches the sink. ### Note on `src/proxy/http3/CMakeLists.txt` This adds two entries to the `test_http3` target: the new test file, and `Http3StreamDataVIOAdaptor.cc` so the adaptor links. #13629 adds that same `Http3StreamDataVIOAdaptor.cc` entry for its own test. The two changes overlap on that one line, so whichever merges second needs a one-line conflict resolution. Both are otherwise independent and each builds and passes on its own against master. ### Test `test_http3`: 137 assertions in 16 test cases, up from 134 in 15 on master. -- 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]
