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

Retry until fail #52

Open
pclalv opened this issue Nov 19, 2015 · 2 comments
Open

Retry until fail #52

pclalv opened this issue Nov 19, 2015 · 2 comments

Comments

@pclalv
Copy link

pclalv commented Nov 19, 2015

i sometimes have to debug finicky tests that can pass or fail depending on timeouts or race conditions. while reasoning about these underlying issues is certainly what will ultimately lead to better, consistent specs, i often find myself wishing i could programmatically run them as many times as i wish, until either the specified number of runs has been reached or the test fails. rspec-retry runs until a failing spec passes. i think it makes sense for rspec-retry to also be able to run a spec until it fails.

for a proof of concept, please see my branch. all a user has to do is tag the spec with :retry_until_fail => true and some number of retries, e.g. :retry => 10. i haven't yet written any specs, but i would be happy to do so if they would be of interest.

@tehdiplomat
Copy link

@michaelglass Setting the retry count to Infinity does not seem to do the same thing that OP was posting about. He seems to specifically be trying to repeat tests until they fail, rather than the default which is repeating them until they succeed.

@michaelglass michaelglass reopened this Dec 19, 2017
@michaelglass
Copy link
Contributor

redacted my comment and you are correct! my bad!

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

No branches or pull requests

3 participants