-
Notifications
You must be signed in to change notification settings - Fork 49
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
| /* 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); |
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.
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?
aws-c-http/include/aws/http/request_response.h
Lines 379 to 385 in e3a9cab
| * @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. |
Issue #, if available:
AWS_ERROR_HTTP_STREAM_HAS_COMPLETEDDescription of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.