[DO NOT MEGE] h3i: implement expected frames #1890
Open
+294
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expected frames allow the user to specify a list of frames that the h3i client expects to receive over a given connection.
If h3i sees all of the exected frames over the course of the connection, it will pre-emptively close the connection with a CONNECTION_CLOSE frame. If h3i does not see all of the expected frames, the resulting ConnectionSummary will contain a list of the missing target frames for future inspection.
This gives users a way to close tests out without waiting for the idle timeout, or adding Wait/ConnectionClose actions to the end of each test. This should vastly speed up test suites that have a large number of h3i tests.
In the absence of full-fledged integration tests, I modified the
content_length_mismatch
example to expect a400
, and remove the existingWait/CC
actions:Taking a PCAP:
You can see that the client instantly sends the CC frame upon receiving the headers frame, without us needing to specify the action.