Skip to content

Conversation

@TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented May 1, 2020

Issue #, if available:

Description of changes:

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

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor Author

@TingDaoK TingDaoK left a 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) {
Copy link
Contributor Author

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.

Copy link
Contributor

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) {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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.

@TingDaoK TingDaoK marked this pull request as ready for review May 4, 2020 18:54
@TingDaoK TingDaoK requested a review from a team May 4, 2020 19:07
@TingDaoK TingDaoK changed the title Fixed some todos in test h2 client Fixed todos in test h2 client May 4, 2020
#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)
Copy link
Contributor Author

@TingDaoK TingDaoK May 4, 2020

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

Copy link
Contributor

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

@TingDaoK TingDaoK requested a review from graebm May 4, 2020 23:28
Copy link
Contributor

@graebm graebm left a 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)
Copy link
Contributor

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) {
Copy link
Contributor

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 */
Copy link
Contributor

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

@TingDaoK TingDaoK merged commit 091f8b7 into master May 6, 2020
@TingDaoK TingDaoK deleted the todos_test_h2_client branch May 6, 2020 16:30
czakian pushed a commit to czakian/aws-c-http that referenced this pull request May 6, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants