-
Notifications
You must be signed in to change notification settings - Fork 440
chore(ci): fix test spans being incorrectly marked as failed #13574
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
chore(ci): fix test spans being incorrectly marked as failed #13574
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 296 ± 6 ms. The average import time from base is: 296 ± 5 ms. The import time difference between this PR and base is: 0.2 ± 0.2 ms. The difference is not statistically significant (z = 0.75). Import time breakdownThe following import paths have shrunk:
|
BenchmarksBenchmark execution time: 2025-06-06 15:07:58 Comparing candidate commit a3e3e81 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 550 metrics, 3 unstable metrics. scenario:iastaspectsospath-ospathsplit_aspect
scenario:iastaspectsospath-ospathsplitdrive_aspect
scenario:iastaspectssplit-splitlines_aspect
|
…raujo/SDTEST-2125/bugfix-tests-marked-as-failed
The repo
tests/conftest.py
defines apytest_runtest_protocol
which was overriding thepytest_runtest_protocol
hook from the Test Optimization pytest plugin, with a number of consequences:skip
,skipif
orsubprocess
markers would not run the Test Optimization hook, causing their spans not to be finished (which in turned caused their module/suite/session not to be finished) and left in afailed
stated.pytest_runtest_protocol
directly withnextitem=None
forced some session fixtures to be torn down and set up again in the next test, which masked a problem with a database fixture in the Django tests.This PR:
None
instead of calling the builtinpytest_runtest_protocol
directly. This causes the next hook (Test Optimization) to run instead of the builtin one.Future work:
subprocess
marker are still being incorrectly sent as failed to Test Optimization (the pytest session passes normally). This will be fixed in a subsequent PR.Checklist
Reviewer Checklist