-
Notifications
You must be signed in to change notification settings - Fork 48
Fixed todos in test h2 client #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TingDaoK
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github is just too clever, those I marked as "old test" are not new code.
| } | ||
|
|
||
| /* Receiving malformed headers should result in a "Stream Error", not a "Connection Error". */ | ||
| TEST_CASE(h2_client_stream_err_malformed_header) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old test, you can skip when you review this pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this comment :)
| return s_tester_clean_up(); | ||
| } | ||
|
|
||
| TEST_CASE(h2_client_conn_err_stream_frames_received_for_idle_stream) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old test, you can skip when you review
|
|
||
| /* Peer may have sent certain frames (WINDOW_UPDATE and RST_STREAM) before realizing | ||
| * that we have closed the stream. These frames should be ignored. */ | ||
| TEST_CASE(h2_client_stream_ignores_some_frames_received_soon_after_closing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old test, you can skip when you review
| /* A server MAY request that the client abort transmission of a request without error by sending a | ||
| * RST_STREAM with an error code of NO_ERROR after sending a complete response. */ | ||
| TEST_CASE(h2_client_stream_receive_rst_stream_after_complete_response_ok) { | ||
| TEST_CASE(h2_client_stream_receive_end_stream_and_rst_before_done_sending) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually an old test, just rename it, and made one more check, you can skip when you review.
| #TODO add_test_case(h2_client_stream_err_receive_info_headers_after_main) | ||
| #TODO add_test_case(h2_client_stream_receive_trailing_headers) | ||
| #TODO add_test_case(h2_client_stream_err_receive_trailing_before_main) | ||
| add_test_case(h2_client_conn_err_stream_frames_received_after_rst_stream_received) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, should this be a stream error instead of connection error? "An endpoint that receives any frame other than PRIORITY after receiving a RST_STREAM MUST treat that as a stream error (Section 5.4.2) of type STREAM_CLOSED" stream_closed_state
Updated here, upcoming PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, you're right!
Guess this should be something like
h2_client_stream_err_frames_received_after_rst_stream_received
graebm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix & ship
| #TODO add_test_case(h2_client_stream_err_receive_info_headers_after_main) | ||
| #TODO add_test_case(h2_client_stream_receive_trailing_headers) | ||
| #TODO add_test_case(h2_client_stream_err_receive_trailing_before_main) | ||
| add_test_case(h2_client_conn_err_stream_frames_received_after_rst_stream_received) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, you're right!
Guess this should be something like
h2_client_stream_err_frames_received_after_rst_stream_received
| } | ||
|
|
||
| /* Receiving malformed headers should result in a "Stream Error", not a "Connection Error". */ | ||
| TEST_CASE(h2_client_stream_err_malformed_header) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this comment :)
| /* a stream error should not affect the connection */ | ||
| ASSERT_TRUE(aws_http_connection_is_open(s_tester.connection)); | ||
|
|
||
| /* validate that stream sent RST_STREAM */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice job on this test
Remaining TODOs in client_test:
h2_client_conn_err_stream_frames_received_long_after_closing: upcoming PR for removing entries from closed_streams_where_frames_might_trickle_in
h2_client_stream/conn_err_flow_control: After we get APIs for user to change setting.
h2_client_send_goaway_with_push_promises: After we fully support PUSH_PROMISE
Issue #, if available:
Description of changes:
Remaining TODOs in client_test:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.