Skip to content

Rerun failed tests up to 5 times before complete fail#1070

Merged
ReimarBauer merged 5 commits intoOpen-MSS:developfrom
Marilyth:test-reruns
Jul 1, 2021
Merged

Rerun failed tests up to 5 times before complete fail#1070
ReimarBauer merged 5 commits intoOpen-MSS:developfrom
Marilyth:test-reruns

Conversation

@Marilyth
Copy link
Collaborator

@Marilyth Marilyth commented Jul 1, 2021

Band aid fix for all the random failing tests on GitHub.
If tests fail, give them 5 more chances to pass before declaring the action failed.
Does not get rid of the occasional xdist hang up.

@Marilyth Marilyth marked this pull request as draft July 1, 2021 12:09
@Marilyth Marilyth marked this pull request as ready for review July 1, 2021 12:28
@Marilyth Marilyth requested review from ReimarBauer and joernu76 July 1, 2021 12:30
@joernu76
Copy link
Member

joernu76 commented Jul 1, 2021

I run sometimes into timeouts already now (at least with my modified time check. NFS??). How does this relate to our maximal runtime?

@joernu76
Copy link
Member

joernu76 commented Jul 1, 2021

What about
https://docs.pytest.org/en/6.2.x/flaky.html

via pytest.mark.xfail?

Especially this deeper link

https://github.com/pytest-dev/pytest-rerunfailures
Seems to do something similar, but allows more fine grained control via

@pytest.mark.flaky(reruns=5)

@Marilyth
Copy link
Collaborator Author

Marilyth commented Jul 1, 2021

Some testing with pytest-rerunfailures caused me a lot of headache and segmentation faults after x reruns.
Considering pytest comes with failure reruns already, I don't see the need for it.

The runtime increases with each failed test. Running them again 5 times will take maybe 10 seconds of overhead + the time needed for the tests * 5. If it passes after 1 retry then the test finishes right there.
It isn't much of an increase.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

see comment

@Marilyth Marilyth requested a review from ReimarBauer July 1, 2021 14:17
Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

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

looks good :)

@ReimarBauer ReimarBauer merged commit a42c6ab into Open-MSS:develop Jul 1, 2021
@Marilyth Marilyth deleted the test-reruns branch July 1, 2021 14:58
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.

3 participants