Skip to content

test(app): internal/app unit tests use 8–17 s of the 15 s budget, time out under load #617

Description

@EricAndrechek

Area: test — unit-test budget · found while building #613

Issue: go test ./internal/app/ takes 8.3–17.0 s on an idle machine (measured in three environments on 2026-09-24: 8.3–17.0 s on main's discovery.go, ~9.4 s on mq-tenant-streams, 10.4 s on main), against the unit-test runner's -timeout 15s. Under load it times out: make ci failed at least five times that evening under heavy load, including TestNew_VerifierPerTenant blocked in os.WriteFile inside the writeSettings helper. Each failure passed when re-run alone. On #612's branch, internal/mq measured ~20 s under load (inferred to be close to the budget when idle, not timed).

Expected: unit packages finish well within the 15 s budget, so make ci does not fail on packages a change never touched.

Scope: profile internal/app tests (boot-per-test cost, settings-directory writes, fixed sleeps/tickers), cut the per-test cost or split the slow ones behind the integration tag; re-time internal/mq after #612.

Related: #613, #612.

Activity

  1. EricAndrechek commented on Sep 25, 2026

    @EricAndrechek
    MemberAuthor

    @/tmp/pr_edits/comment5826871963.md

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions