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

Handle flasky tests #1297

Open
HoussemNasri opened this issue Nov 12, 2024 · 4 comments
Open

Handle flasky tests #1297

HoussemNasri opened this issue Nov 12, 2024 · 4 comments

Comments

@HoussemNasri
Copy link
Member

Description

Here's a typical scenario: I open a pull request, the build kicks off, and about an hour and a half later, the pipeline fails. When I check the failed tests, it’s something completely unrelated to my changes—a classic flaky test problem.

Here are some suggestions:

  • Run flaky tests in a separate pipeline
    If flaky tests have their own pipeline, we can simply rerun that part when it fails instead of rerunning everything.

  • Disable flaky tests (not ideal)

  • Try the Jenkins Flaky Test Handler plugin
    Here’s the plugin. It’s designed to identify and rerun flaky tests automatically, which could help in our situation.

Why This Matters:

  • Save Resources: Rerunning the whole pipeline for a flaky test is a waste of hardware and cloud resources.
  • Boost Productivity: Each time a flaky test fails, we’re looking at at least an hour’s delay to rerun the pipeline. Fixing this would speed up the pull request merge process, making life easier for everyone.
@chibenwa
Copy link
Member

It’s designed to identify and rerun flaky tests automatically, which could help in our situation.

How about fixing the flacky test?

When we encoutered an unrelated failing test we just open a ticket about it investigate it and fix it.

rerun flaky tests automatically

I'm against it. That would be hiding issues that would only grow worse. Let's rather fix them.

@HoussemNasri
Copy link
Member Author

HoussemNasri commented Nov 12, 2024

How about fixing the flacky test?

Question is: is it always possible to fix a flasky test.

When we encoutered an unrelated failing test we just open a ticket about it investigate it and fix it

+1

Could be useful:

I'm against it. That would be hiding issues that would only grow worse. Let's rather fix them.

The plugin would also categorize a test as flasky if it fails and succeeds on rerun so it can be used to detect flasky tests too.

@chibenwa
Copy link
Member

Question is: is it always possible to fix a flasky test.

Yes

@chibenwa
Copy link
Member

The plugin would also categorize a test as flasky if it fails and succeeds on rerun so it can be used to detect flasky tests too.

A broken build is IMO a better incetive to fix stuff

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

2 participants