Skip to content
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

async-stream: lots more tests #311

Merged
merged 5 commits into from
Jun 9, 2023
Merged

async-stream: lots more tests #311

merged 5 commits into from
Jun 9, 2023

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Jun 7, 2023

Expand to have more than just 3 tests to stress aws_async_input_stream

  • when Content-Length is known:
    • test single-part (goes through "default" flow, all other tests go through MPU flow)
    • vanilla multi-part test
    • test when aws_async_input_stream_read() actually completes synchronously
    • test when async read() doesn't fill the buffer
      • threw in test to check this for synchronous reads too
  • when Content-Length is unknown (always goes through MPU flow):
    • test length < part size
    • test length == part size
    • test length == part size BUT we don't realize it's at EOF util we try to read the 2nd part
    • test length > part size

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

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2023

Codecov Report

Merging #311 (777ce92) into main (2417288) will increase coverage by 0.06%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
+ Coverage   88.95%   89.01%   +0.06%     
==========================================
  Files          17       17              
  Lines        4936     4936              
==========================================
+ Hits         4391     4394       +3     
+ Misses        545      542       -3     

see 2 files with indirect coverage changes

@graebm graebm changed the title async-stream: test edge cases around stream length async-stream: lots more tests Jun 8, 2023
We add a 1/10sec sleep to each async read in tests. Use bigger chunks so we do 9 reads per chunk, instead of 10000+ reads per chunk
@graebm graebm merged commit a7c8e51 into main Jun 9, 2023
@graebm graebm deleted the more-async-tests branch June 9, 2023 19:40
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