You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(unit): internal/mq and internal/app use 10-11 s of the 15 s unit budget #739
Area: test, unit-test budget. Found while running make ci for #712. That branch's internal/mq differs from main only in three //nolint comments.
Issue.#647 fitted internal/mq into make test-unit's -timeout 15s. TestVerifyNATSTopology_Findings came after, in #624, and runs its cases one after another against one shared server.
That test alone takes 8.8 s (measured: go test -race -count=1 -run TestVerifyNATSTopology_Findings ./internal/mq/). It is roughly 40 cases of about 0.2 s each.
The whole package takes 11.0 s alone (measured: go test -race -count=1 -cover ./internal/mq/, on a machine with a 1-minute load average around 30).
Inside make ci, the package took 9.1 to 15.6 s across 19 runs between 2026-10-04 and 2026-10-06 (measured from the make ci logs). It took over 13 s in 7 of the 10 runs on 2026-10-06.
The last three runs timed out:panic: test timed out after 15s, each time inside a TestVerifyNATSTopology_Findings case (durable_pinned_ttl_over_the_membership_lease, history_at_one_replica), while other packages' tests ran in parallel. The same package passes when run alone.
Expected. Unit packages finish well within the 15 s budget, so make ci doesn't fail on a package a change never touched.
Related:#617 (the same symptom for internal/app, with internal/mq noted near the budget; closed by #647).
Other packages show the same pattern, measured in the same make ci runs (2026-10-04 to 2026-10-06). It isn't only internal/mq.
package
duration inside make ci
timeouts
internal/app
9.6 to 14.0 s across 20 runs; #617 measured 8 to 17 s before #647
none seen
internal/dedupe
usually 5.6 to 8.5 s; 10.4 to 12.0 s in the busier runs
one 15.3 s timeout, under heavy load (1-minute load average ~75)
internal/typelayer
8.1 to 15.2 s across 18 runs
timed out in the same heavy-load run
internal/typelayer exists only on #712's branch, so its share is #712's to fix.
Every package runs under one fixed -timeout 15s while all packages run in parallel, so how loaded the machine is decides whether make ci passes on packages a change never touched.
changed the title [-]test(mq): internal/mq unit tests are back at the 15 s budget and time out under load[/-][+]test(unit): internal/mq and other packages are back at the 15 s unit budget and time out under load[/+]on Oct 6, 2026
Correction.#734, merged to main at 2026-10-06 18:38Z before this issue was filed, already gives make ci's parallel unit phase a 60 s limit (UNIT_TIMEOUT). Every make ci run above was on a branch without #734, so the make ci timeouts described here shouldn't recur on a branch that has it.
What remains:make test-unit and CI's unit job keep the 15 s budget, and run each package with the suite on its own.
internal/mq takes 11.0 s alone (measured, on a loaded machine).
changed the title [-]test(unit): internal/mq and other packages are back at the 15 s unit budget and time out under load[/-][+]test(unit): internal/mq and internal/app use 10-11 s of the 15 s unit budget[/+]on Oct 6, 2026
Activity
EricAndrechek commentedon Oct 6, 2026
Other packages show the same pattern, measured in the same
make ciruns (2026-10-04 to 2026-10-06). It isn't onlyinternal/mq.make ciinternal/appinternal/dedupeinternal/typelayerinternal/typelayerexists only on #712's branch, so its share is #712's to fix.Every package runs under one fixed
-timeout 15swhile all packages run in parallel, so how loaded the machine is decides whethermake cipasses on packages a change never touched.[-]test(mq): internal/mq unit tests are back at the 15 s budget and time out under load[/-][+]test(unit): internal/mq and other packages are back at the 15 s unit budget and time out under load[/+]EricAndrechek commentedon Oct 6, 2026
Correction. #734, merged to
mainat 2026-10-06 18:38Z before this issue was filed, already givesmake ci's parallel unit phase a 60 s limit (UNIT_TIMEOUT). Everymake cirun above was on a branch without #734, so themake citimeouts described here shouldn't recur on a branch that has it.What remains:
make test-unitand CI's unit job keep the 15 s budget, and run each package with the suite on its own.internal/mqtakes 11.0 s alone (measured, on a loaded machine).internal/apptakes about 10 s alone, by build(test): keep make ci's time limits from killing healthy runs #734's own figure.Both are within budget but with little headroom. That remaining part is what this issue now covers; the title is updated to match.
[-]test(unit): internal/mq and other packages are back at the 15 s unit budget and time out under load[/-][+]test(unit): internal/mq and internal/app use 10-11 s of the 15 s unit budget[/+]test(mq): tolerate the nats version advisory and speed up topology te…