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

Add support for TEST_SKIP_AFTER_FAILURE_COUNT #5475

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tdiesler
Copy link
Contributor

@tdiesler tdiesler commented May 8, 2024

Borrowed from maven surefire - count test failures and skip subsequent tests when failure count > $TEST_SKIP_AFTER_FAILURE_COUNT
The default is TEST_SKIP_AFTER_FAILURE_COUNT=3

This can significantly speed up validation of bad PRs

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Not sure to understand this change request. Consider that when you're running in GH actions, each workflow would execute each test suite individually. For instance, it does make test-common. So, in such case, this new variable is never took in consideration. The only case where it can make sense here would be in the test-smoke. However, such a test is only executed at night time before nightly release, and, it only have 4 possible failures, so, we'd really skip almost nothing.

@tdiesler
Copy link
Contributor Author

tdiesler commented May 8, 2024

make test-smoke takes > 30min on my box. If something goes wrong at the beginning, it already safes quite some time when set to 1. We can expand this to the other test suites later, if wanted

@squakez
Copy link
Contributor

squakez commented May 8, 2024

make test-smoke takes > 30min on my box. If something goes wrong at the beginning, it already safes quite some time when set to 1. We can expand this to the other test suites later, if wanted

Okey, then, we better make the variable scope local to this specific action. Otherwise we can get mislead and think that this is a global scope and would affect all test suite executions.

@christophd
Copy link
Contributor

How about a TEST_FAIL_FAST=true option so the test suite stops after the 1st failure. I don't see why somebody would be interested in stopping execution after >1 failing tests when asking for fast feedback.

@tdiesler
Copy link
Contributor Author

tdiesler commented May 8, 2024

In surefire, it defaults to 0. Folks set it higher to see e.g. "the first three failures"
Would you like to expand this to the other test suites i.e. if smoke fails, no need to execute the others?

@tdiesler tdiesler force-pushed the skip_after_failure branch 2 times, most recently from 819e3a1 to bb9f601 Compare May 9, 2024 07:02
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.

None yet

3 participants