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

Do not retry test if beforeAll fails #8227

Merged
merged 6 commits into from
Mar 27, 2019

Conversation

palmerj3
Copy link
Contributor

Summary

Fixes #8221

If test retries are enabled - do not retry tests when beforeAll/beforeEach fails.

Test plan

Added additional e2e test to test for this regression

@palmerj3
Copy link
Contributor Author

@SimenB @TonyG623

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Missing changelog, implementation lgtm 🙂

@palmerj3
Copy link
Contributor Author

Missing changelog, implementation lgtm 🙂

All set

@@ -48,9 +48,14 @@ const _runTestsForDescribeBlock = async (describeBlock: DescribeBlock) => {
const deferredRetryTests = [];

for (const test of describeBlock.tests) {
const isErrorsBeforeTestRun = test.errors.length > 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: maybe hasErrorsBeforeTestRun?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I pushed another commit for that just now.

Copy link

@TonyG623 TonyG623 left a comment

Choose a reason for hiding this comment

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

looks great!

@palmerj3
Copy link
Contributor Author

Figuring out how to write a test in the e2e suite that will work. Bear with me while I work through this.

@palmerj3
Copy link
Contributor Author

@SimenB @thymikee I think this is ready. Let me know if you want me to push another commit to retrigger the test-node-10 job. But looks like that's a flaky test not related to this change.

@SimenB
Copy link
Member

SimenB commented Mar 27, 2019

Pushing just so ci is happy seems like a good thing to me 🙂

@TonyG623
Copy link

@palmerj3

It looks like the test is referencing beforeAllFailure.test.js which is no longer in your PR. Looks like it got deleted.

@palmerj3
Copy link
Contributor Author

Doh - pushing now

@palmerj3
Copy link
Contributor Author

Ok now that CI is in a good place I can ask for another review :)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With Retries enabled, a failure in beforeAll is not thrown.
6 participants