Repository navigation
tests: mark planted-fixture assess tests slow for the time ratchet (Closes #5240) - #5246
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #5240.
Root Cause
In
tests/cobol_mainframe/test_assess.py(added in #5234), the module-scopedplantedfixture runs two full subprocess invocations ofpython -m gitgalaxy.cli assess(each of which spawns agitgalaxy.galaxyscopesubprocess scan).smoke-test.ymladds--ignore=tests/cobol_mainframe(delegatingtests/cobol_mainframe/tomainframe-ground-truth.yml, which does not runtime_ratchet.py check), so the missing@pytest.mark.slow(reason=...)marker did not surface until merge tomain.main(push),smoke-test.ymlsplit the threeplantedtests acrossfull-suiteparts 1–3:time_ratchet.py checkontest_planted_text_never_reaches_the_report(25.5s>15slimit).test_the_estate_is_read_only(11.0s>10sthreshold) becauseplantedis module-scoped and ran setup again in part 2/3.Fix
Mark the three
planted-fixture tests (test_planted_text_never_reaches_the_report,test_the_estate_is_read_only,test_out_inside_the_estate_is_refused) with@pytest.mark.slow(reason="#4726: planted fixture runs two subprocess gitgalaxy assess scans (#5240)"), matchingtest_assess_every_burned_estatein the same module.Verification
GITGALAXY_TEST_TIMES=/tmp/times-5240.json pytest tests/cobol_mainframe/test_assess.py -k "planted or read_only or out_inside" && python tests/tools/time_ratchet.py check --times /tmp/times-5240.json(3 tests checked, 0 over the per-test limit, 0 warned)tests/tools/box/heavy-run.sh python tests/tools/pr_gates.py --fast(6/6 gates pass)