Skip to content

H2 manual write triggers the stream complete test #510

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

Merged
merged 3 commits into from
Apr 1, 2025
Merged

Conversation

TingDaoK
Copy link
Contributor

Issue #, if available:

  • While I am binding out the function, I found this behavior confusing.
  • The data write failed to be read from, but it will fail the data write with AWS_ERROR_HTTP_STREAM_HAS_COMPLETED
  • But when I dig into the code, it does make sense, the write will fail with stream completed, and the stream will complete with the real error.
  • Add one test to display this behavior.

Description of changes:

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

@TingDaoK TingDaoK changed the title add one more test for manual write H2 manual write triggers the stream complete Mar 28, 2025
@TingDaoK TingDaoK changed the title H2 manual write triggers the stream complete H2 manual write triggers the stream complete test Mar 28, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.49%. Comparing base (e526ac3) to head (6e9690d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #510   +/-   ##
=======================================
  Coverage   79.48%   79.49%           
=======================================
  Files          27       27           
  Lines       11686    11684    -2     
=======================================
- Hits         9289     9288    -1     
+ Misses       2397     2396    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TingDaoK TingDaoK merged commit ef78cb8 into main Apr 1, 2025
42 checks passed
@TingDaoK TingDaoK deleted the add-one-more-test branch April 1, 2025 20:15
/* The stream complete will get the error code from the input stream read. */
ASSERT_UINT_EQUALS(stream_tester.on_complete_error_code, AWS_IO_STREAM_READ_FAILED);
/* The write triggers the stream to complete with error, so the write failed as the stream completes. */
ASSERT_UINT_EQUALS(error_code, AWS_ERROR_HTTP_STREAM_HAS_COMPLETED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say that it should work the way you assumed, that the stream-write-complete error-code should have been AWS_IO_STREAM_READ_FAILED, and not AWS_ERROR_HTTP_STREAM_HAS_COMPLETED. Is this easy to fix?

* @param error_code If error_code is AWS_ERROR_SUCCESS (0), the data was successfully sent.
* Any other error_code indicates that the HTTP-stream is in the process of terminating.
* If the error_code is AWS_ERROR_HTTP_STREAM_HAS_COMPLETED,
* the stream's termination has nothing to do with this write operation.
* Any other non-zero error code indicates a problem with this particular write
* operation's data.
* @param user_data User data for this write operation.

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.

4 participants