Wallabidi.Test.SlowTestGuard (wallabidi v0.4.0-rc.2)

Copy Markdown View Source

Custom ExUnit formatter that flags tests exceeding a runtime budget.

Tests come in two budgets:

  • DefaultWALLABIDI_SLOW_TEST_MS (1500ms by default). Untagged tests must finish within this. Anything slower indicates a real perf regression in the driver, an unwanted polling fallback, or a test that's now legitimately slow and needs a tag.

  • Per-test slow budget — opt-in via @tag :slow (4000ms default) or @tag slow: N_ms for an explicit budget. For tests that legitimately wait — refute_has, slow handle_event scenarios, multi- session lifecycle checks. Tests still fail if they exceed their declared budget.

Defaults to :raise mode (the suite exits non-zero if any offender is found). Override with WALLABIDI_SLOW_TEST_MODE=warn for a softer signal during local development.

Attach in your test_helper.exs:

ExUnit.start(formatters: [ExUnit.CLIFormatter, Wallabidi.Test.SlowTestGuard])

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.