0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-07 13:19:19 +08:00
discourse/spec/tasks
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
..
assets_precompile_spec.rb DEV: Cache AssetProcessor code in development (#38036) 2026-02-25 11:24:41 +00:00
compatibility_spec.rb
destroy_spec.rb
hashtags_spec.rb
incoming_emails_spec.rb
migrate_advanced_search_banner_to_welcome_banner_spec.rb DEV: Silence expected error/debug output in core specs (#39247) 2026-04-14 11:04:10 +02:00
migrate_discourse_gifs_to_core_multisite_spec.rb DEV: better multisite suppport for migrate gifs (#40792) 2026-06-11 17:51:27 +04:00
migrate_discourse_gifs_to_core_spec.rb DEV: set enable_gifs to true in migrate gifs rake task (#41502) 2026-07-07 17:04:28 +04:00
nested_replies_spec.rb PERF: Add fast nested reply stats preparation (#41870) 2026-07-21 10:45:53 -05:00
plugin_spec.rb DEV: Prune branches on plugin:update (#38128) 2026-02-28 00:14:50 +01:00
posts_spec.rb FIX: PG::UniqueViolation for PostTimings in posts:reorder_posts rake task when PostTiming records have no corresponding Post (#35212) 2025-10-08 18:48:21 +02:00
qunit_cli_spec.rb DEV: Fail fast when the qunit browser stalls (#41919) 2026-07-22 12:43:54 -03:00
redis_spec.rb
release_spec.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
site_settings_spec.rb FIX: type: objects uploads should be stored as IDs (#40178) 2026-05-21 13:45:27 -03:00
themes_spec.rb FEATURE: rake tasks to export/import theme bundles 2026-04-30 21:03:48 +00:00
topic_localizations_spec.rb DEV: Add rake task to backfill localization excerpts which were empty (#36901) 2025-12-30 17:04:36 +08:00
topics_spec.rb
uploads_spec.rb DEV: Move test cleanup to correct scope in tasks/uploads_spec.rb (#36386) 2025-12-02 17:45:28 +01:00
users_spec.rb