Enhancement: add support for .retry(n)
See original GitHub issueIn a perfect world, there would be no ECONREST or ENOTFOUND, or 504, but in the real-world, especially when performing functional/integration tests while another team might be running load tests on a shared test environment, it would be really helpful to not bail at the first sign of trouble.
This enhancement request is for the addition of a ‘.retry(n)’ request option.
i.e.
request(http://mydomain.com)
.post('something_wonderful')
.set('User-Agent', 'tester-testtown-testington')
.send(data)
.retry(3)
.end(function(error, res) {
if (error) throw error;
callback(null, res);
});
Issue Analytics
- State:
- Created 9 years ago
- Comments:8
Top Results From Across the Web
add support for .retry(n) · Issue #167 · ladjs/supertest - GitHub
This enhancement request is for the addition of a '.retry(n)' request option. i.e.. request(http://mydomain.com) .post('something_wonderful') .
Read more >Best practices for retry pattern - Medium
Retries are a core resiliency pattern which help enhance service availability by re-attempting failed operations.
Read more >c# - Cleanest way to write retry logic? - Stack Overflow
I needed a method that supports cancellation, while I was at it, I added support for returning intermediate failures.
Read more >Proper Retry in JavaScript - Solutional
Let's create a simple code to verify that assumption. First we create some functions, which help us in testing. const request = (failuresCount) ......
Read more >Auto Retry failed CI jobs (#3442) · Issues - GitLab.org
I would like to be able to specify retry_count in gitlab-ci.yml which will retry failing builds N times. It should be something pretty...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, it would be nice Supertest allowed Superagent plugins to be set up by the user. I’m not sure if that can currently be done without changes to Supertest code.
Was this issue closed because there are no plans to add retry support for supertest?