Repository navigation
test: split the slow test modules so that each runs in about two minutes or less - #407
Conversation
…tes or less Ten modules took between 2.5 and 10 minutes alone. Each is now split into modules of at most about two minutes: the allocation reliability matrix (6 modules), the solver stress cases (6), the packaged catalogue journey (4), mix_cli (4), status matrix wiring (3), grower outputs (2), pH inputs (3), precipitation report (2), ratio search constraints (3) and independent reagent capacity (2). Helpers move to support modules; no test is changed. Two guard tests keep the generated cases from outgrowing their modules.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 152 152
Lines 18112 18112
Branches 3657 3657
=========================================
Hits 18112 18112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 similar comments
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 152 152
Lines 18112 18112
Branches 3657 3657
=========================================
Hits 18112 18112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 152 152
Lines 18112 18112
Branches 3657 3657
=========================================
Hits 18112 18112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 152 152
Lines 18112 18112
Branches 3657 3657
=========================================
Hits 18112 18112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NOT READY until CI is green.
Closes #406
Splits the test modules that took more than about two minutes alone, so that each runs well inside the five-minute limit even at twice the load. Test bodies are moved unchanged; helpers go to support modules (
*_support.py).test_ratio_allocation_reliabilitytest_ratio_solver_stresstest_mix_clitest_status_matrix_wiringtest_ph_inputstest_grower_outputstest_precipitation_reporttest_ratio_search_constraintstest_independent_reagent_capacityTimes are one sequential run of each module alone on one machine; the same tests took up to twice as long under load, which is why the line is about two minutes.
Proof that nothing was lost: the whole suite was collected on
mainand on this branch. All 2,282 test methods onmainexist on the branch, and the only additions are two guard tests (2,284 in total, all ids unique). Each split also compared the test names of the module before and after (identical).Also changed:
tools/ci_test_weights.jsonfollows the moved tests. Where the file had only a class weight, it is shared by the number of tests in each part, so the new weights are approximate; they only balance CI shards.tests/test_ci_parallel.pyand the docs command indocs/steiner-allocation-validation.mdfollow the new modules; twelve test modules import from the new support modules instead of the old test modules.Left whole on purpose (alone, one run):
test_default_range_and_temperature108 s,test_acceptable_incidental115 s,test_grower_journey_reports80 to 145 s,test_grower_journey_reagents83 s. A single test cannot be split by module:test_second_field_session_by_name_and_readable_gramstakes about 177 s and the brushite report test about 118 s; shrinking them would change the tests and is separate work.Verified on this branch:
test_ci_parallel.pythat main already has.Not yet verified: the CI coverage and Python 3.11 gates.