Skip to content

test(unit): internal/mq and internal/app use 10-11 s of the 15 s unit budget #739

Closed

Description

@EricAndrechek

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).

Activity

  1. EricAndrechek commented on Oct 6, 2026

    @EricAndrechek
    MemberAuthor

    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.

  2. 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
  3. EricAndrechek commented on Oct 6, 2026

    @EricAndrechek
    MemberAuthor

    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.

    Both are within budget but with little headroom. That remaining part is what this issue now covers; the title is updated to match.

  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions