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

fix: set test total properly with --fail-zero and --delay #5057

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joandino
Copy link

PR Checklist

Description of the change

When running --fail-zero along with --delay the result always return 1 even when at least one test runs.
Apparently the total variable in the runner was not being updated after the event delay ends and the tests runs.

On the emit of the EVENT_DELAY_END we make sure to update the total of tests ran.

Why should this be in core?

To prevent tests that run with --fail-zero and --delay always fail.

Applicable issues

This will be a fix/patch release

When running --fail-zero along with --delay exit with code 0 if at least one test runs.
Copy link

linux-foundation-easycla bot commented Dec 28, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Functionally, this seems reasonable to me - though I haven't looked deeply. We can take another look if there's test coverage added. Thanks! ✨

Copy link
Member

Choose a reason for hiding this comment

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

[Testing] The change looks functionally good, but we'll want to add a test to ensure it both works now & stays working in the future. Could you please?

@JoshuaKGoldberg JoshuaKGoldberg added status: waiting for author waiting on response from OP - more information needed semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Mar 4, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title fix: closes #4950 fix: set test total properly with --fail-zero and --delay Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes" status: waiting for author waiting on response from OP - more information needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug: --fail-zero always fails the test run when --delay is also used
2 participants