Run more of the test suite in parallel closes #610 #612
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
local-it/mitgliederverwaltung!612
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue/mitgliederverwaltung-610"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
closes #610
Description of the implemented changes
The changes were:
The suite spent about 235 s of its ~280 s in the serial phase. This branch flips the slowest serial modules (selected by measurement) to
async: true, after giving every async test its own values under unique indexes so concurrent sandbox transactions no longer wait on each other's uncommitted rows. Tests that touch process-global state stay serial, and each serial module now states why in a# Serial: <reason>.comment that an architecture test enforces. No product code changed.What has been changed?
Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
Before / after (
just test-fast --seed <s>, same 4-vCPU host)The async phase grows by ~10 s and the sync phase shrinks by ~60 s on an idle host (about −50 s total, ~18 %). Under concurrent load from another test run the total gain mostly disappears (~1 %), because the larger async phase competes for the same CPUs. Final
just ci-dev: 231.4 s (53.0 s async, 178.4 s sync), 0 failures.Async-test rules introduced
40P01mechanisms: FK MultiXact locks (fixed earlier by deferrable FKs) and unique-index waits on another sandbox transaction's uncommitted row (fixed here bySystem.unique_integer([:positive])values per test).SettingsCacheis started), but they hold the row lock until the test ends; flipping such a module from serial to async needs a measured gain and an isolation proof (done forcycle_generator_edge_cases_test.exs).ScopeOverviewParityPropertyTestruns async with@moduletag timeout: 180_000: lock sampling showed no lock waits, its duration grows with CPU load (up to 48 s under load).Handover to #540 (serial modules held back by global state)
System.put_env/delete_env): config, SMTP, OIDC, Vereinfacht and release tests — needs config passed explicitly instead ofSystem.get_env/1.Application.put_env/delete_env): join notifier, OIDC provider observer, mailer, join confirm — needs injected module/config.Membership.update_settings/2) with no measurable gain (<1 s), plus the LiveView modules deferred to U7/U10/#549 — needs settings passed explicitly or a per-test settings fixture.SettingsCacheprocess, Logger level, Mix shell, telemetry handlers, the OIDC discovery cache (:persistent_term) and theJoinRateLimitETS table — need process-local alternatives or stay serial.Review
The review loop reached its 4-iteration cap (11 → 2 → 2 → 4 findings, all accepted, no security findings); the remaining findings were addressed and the loop was closed by the reviewer's approval.
Process
Backtrack from tdd to requirements: the scope was extended from
test/mv/**totest/mv_web/**outsidelive/after the first measurement showedtest/mv/**held only 38.9 s of 235 s serial time.Larger commits
"Give each async test its own values under unique indexes" (41 files, ~1.1k lines added) and "State why each serial test module runs serially" (156 files, comments only) are large but mechanical.