Diagnosed the recurring 'tests hang' pain by measurement: the logic layer is fast and reliable (dart test commons_core ~1s/82 tests; flutter test test/services ~11s/124 tests, green), and only WIDGET tests hang — because pumpAndSettle() waits for a screen to stop scheduling frames and a live source (Drift/Nostr stream, periodic Timer, connectivity/plugin) never does, so it sits at the 10-minute default and the run looks stuck. - apps/app_seeds/dart_test.yaml sets timeout: 90s so such a test FAILS fast and names itself instead of blocking the whole run. - CLAUDE.md now spells out the split-by-layer workflow (logic via dart test/flutter test test/services; widget tests targeted + timed out; never pumpAndSettle a live screen).
13 lines
768 B
YAML
13 lines
768 B
YAML
# Global per-test timeout. Without it, a widget test that pumpAndSettle()s a
|
|
# screen with a never-settling source (a live Drift/Nostr stream, a periodic
|
|
# Timer, connectivity_plus, a plugin) waits at the 10-minute default and the
|
|
# whole run LOOKS hung. With this, such a test FAILS in 90s and names itself.
|
|
#
|
|
# The everyday, hang-proof gate is the logic layer, not widgets:
|
|
# dart test packages/commons_core # pure Dart, ~1s
|
|
# flutter test test/services # logic + in-memory DB, ~10s, no widgets
|
|
# Run widget tests targeted (flutter test test/ui/<file>), never blind, and
|
|
# never pumpAndSettle a live screen — pump(Duration) a bounded number of times.
|
|
#
|
|
# A genuinely slower (but finite) test can opt out with @Timeout(Duration(...)).
|
|
timeout: 90s
|