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

Make functional tests faster #1017

Merged
merged 5 commits into from
Nov 26, 2024
Merged

Make functional tests faster #1017

merged 5 commits into from
Nov 26, 2024

Conversation

agateau-gg
Copy link
Collaborator

Context

Our test suites can run faster by making use of the pytest-xdist plugin, which can distribute tests on several cores.

What has been done

  • Install pytest-xdist
  • Make our functional test suite use it
  • Fix some pytest-xdist-related issues in our unit-test suite

Unfortunately this PR does not activate pytest-xdist on our unit-test suite for now because some tests randomly fail: sometimes log messages are not received when they should be (that could be related to the recent logging work I did 😒) and sometimes SecretScanner tests fail because of a corrupted .cache_ggshield file.

Validation

Run make functest. It should be faster.

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.04%. Comparing base (035d74b) to head (193862c).
Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1017   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files         181      181           
  Lines        7717     7717           
=======================================
  Hits         7103     7103           
  Misses        614      614           
Flag Coverage Δ
unittests 92.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@agateau-gg agateau-gg merged commit f394b81 into main Nov 26, 2024
31 checks passed
@agateau-gg agateau-gg deleted the agateau/pytest-xdist branch November 26, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants