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

feat: add initial retry delay, and set default to 100ms #336

Merged
merged 3 commits into from
Sep 14, 2020

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Sep 13, 2020

Fixes #333

@JustinBeckwith JustinBeckwith requested a review from a team as a code owner September 13, 2020 04:51
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 13, 2020
@JustinBeckwith JustinBeckwith requested a review from bcoe September 13, 2020 04:51
@codecov
Copy link

codecov bot commented Sep 13, 2020

Codecov Report

Merging #336 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #336      +/-   ##
==========================================
+ Coverage   95.52%   95.53%   +0.01%     
==========================================
  Files           6        6              
  Lines         670      672       +2     
  Branches      105      106       +1     
==========================================
+ Hits          640      642       +2     
  Misses         30       30              
Impacted Files Coverage Δ
src/common.ts 100.00% <100.00%> (ø)
src/retry.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b626d4...3834197. Read the comment docs.

await request({
url,
retryConfig: {
retryDelay: 500,
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a nice simple way to write this test for now 👍

I've definitely seen tests like this that add 100+ ms delays add up over time, and lead to a fairly slow test suite... I don't think this will bite us, having a couple smoke tests for retry logic.

@JustinBeckwith JustinBeckwith merged commit 870326b into master Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow down initial retry attempt
3 participants