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

ci: serialise integration tests and quarantine problematic tests #1149

Merged

Conversation

james-garner-canonical
Copy link
Contributor

@james-garner-canonical james-garner-canonical commented Oct 9, 2024

Tests in integration/test_model.py seem to be flaky even when run serially. All tests in integration/test_crossmodel.py are currently skipped, except one which used to be skipped, and is currently flaky even when run serially.

This PR:

As a bonus feature, this split of the tests into two runners with -n 1 seems to be faster than the original method of running all the integration tests in a single runner with -n auto (which worked out to be 4 processes on github).

Integration tests are incredibly flakey currently. Perhaps this is
related to the parallel execution of the tests. Certainly the fact that
the tests are randomly distributed across threads doesn't help with
figuring out what works and what doesn't.
Copy link
Contributor

@dimaqq dimaqq left a comment

Choose a reason for hiding this comment

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

That works.

I would rather prefer a custom pytest marker, as that would allow putting entire files as well as individual tests in quarantine.

I suppose that could be changed later just as well.

@james-garner-canonical
Copy link
Contributor Author

I would rather prefer a custom pytest marker, as that would allow putting entire files as well as individual tests in quarantine.

I can see the value in that.

My thinking is that this separate job is not really intended as a permanent quarantine zone, but rather we'll eventually fix the model and cross model tests, and then rename the job to 'Integration - model' or something. We'd keep the separate job for easier debugging and faster test runtime. I think 'Quarantined Integration Tests' works as the name for now since contributors will understand when it fails.

A you say, if we go in the direction of wanting to quarantine individual tests in the future we could add a pytest marker in the future.

@james-garner-canonical
Copy link
Contributor Author

/merge

@jujubot jujubot merged commit 9964611 into juju:main Oct 9, 2024
10 of 12 checks passed
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