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

add tests for downloading and fix retry bug #32

Merged
merged 5 commits into from
Aug 20, 2024
Merged

add tests for downloading and fix retry bug #32

merged 5 commits into from
Aug 20, 2024

Conversation

poszu
Copy link
Collaborator

@poszu poszu commented Aug 20, 2024

Fixed 2 bugs in the downloading code:

  1. Expect a 206 (Partial Content) HTTP status code and retry on any different code
  2. Use the persisted redirect URL when retrying in download_with_retries. Previously, it could happen that the server changes the DB in between tries which led to partially downloading versions A and B.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 69.69697% with 10 lines in your changes missing coverage. Please review.

Project coverage is 48.03%. Comparing base (084107c) to head (f5723de).
Report is 7 commits behind head on main.

Files Patch % Lines
src/go_spacemesh.rs 0.00% 4 Missing ⚠️
src/utils.rs 0.00% 4 Missing ⚠️
src/download.rs 92.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #32       +/-   ##
===========================================
+ Coverage   24.80%   48.03%   +23.22%     
===========================================
  Files          11       11               
  Lines         254      254               
===========================================
+ Hits           63      122       +59     
+ Misses        191      132       -59     

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

Copy link
Member

@brusherru brusherru left a comment

Choose a reason for hiding this comment

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

👍

@poszu poszu merged commit 747b1cc into main Aug 20, 2024
17 checks passed
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