0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 21:57:36 +08:00
discourse/bin
Sérgio Saquetim dbea1f184f
DEV: Fail fast when the qunit browser stalls (#41919)
`bin/qunit` could wait indefinitely for a headless browser that
connected but then stopped making test progress, hanging the whole run
with no useful diagnostics. This is most painful when the run was
launched in an automated way, for example by an agent or in CI: a wedged
headless Chrome blocks the caller with no signal, instead of returning a
fast, diagnosable failure it can act on.

This adds a browser watchdog that fails fast and identifies the reason
instead of hanging. testem's native start timeout handles a browser that
never connects, and a small testem patch handles one that connects but
then goes idle outside an active test, reporting `Browser made no test
progress for N seconds` on stderr and through the test result. There is
deliberately no retry logic: on a stall the run exits non-zero so the
caller that launched it can decide to retry the whole run.

The watchdog is on by default and its two timeouts are configurable
through flags and matching environment variables: `--browser-watchdog` /
`QUNIT_BROWSER_WATCHDOG`, `--browser-start-timeout` /
`QUNIT_BROWSER_START_TIMEOUT` (default 45s), and
`--browser-inactivity-timeout` / `QUNIT_BROWSER_INACTIVITY_TIMEOUT`
(default 30s).

The CLI flag and environment wiring, including precedence over the
environment, is covered by RSpec. The testem patch itself is not
unit-tested, to avoid standing up a separate node test harness just to
exercise another test harness.
2026-07-22 12:43:54 -03:00
..
docker DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
annotaterb DEV: Update bundler from 2.6.4 to 4.0.11 (#40441) 2026-06-01 21:35:53 +02:00
bundle DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
dev DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
ember-cli DEV: bin/ember-cli shim fixups (#40402) 2026-05-29 12:38:38 +01:00
lint DEV: add typescript support for core, themes and plugins (#41478) 2026-07-08 12:57:18 +01:00
notify_file_change
pitchfork DEV: Remove Unicorn web server in favor of Pitchfork (#39032) 2026-04-01 15:04:59 +02:00
qunit DEV: Fail fast when the qunit browser stalls (#41919) 2026-07-22 12:43:54 -03:00
rails DEV: Remove Unicorn web server in favor of Pitchfork (#39032) 2026-04-01 15:04:59 +02:00
rake DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
rspec DEV: Add per-test SQL/Redis/network capture RSpec formatter (#40632) 2026-06-16 09:47:54 +08:00
rubocop DEV: Update bundler from 2.6.4 to 4.0.11 (#40441) 2026-06-01 21:35:53 +02:00
system_rspec
turbo_rspec DEV: Add per-test SQL/Redis/network capture RSpec formatter (#40632) 2026-06-16 09:47:54 +08:00