Skip to content

Handle transient browser disconnections#1515

Open
davidtaylorhq wants to merge 1 commit into
ember-cli:mainfrom
davidtaylorhq:fix-disconnect-completion-race
Open

Handle transient browser disconnections#1515
davidtaylorhq wants to merge 1 commit into
ember-cli:mainfrom
davidtaylorhq:fix-disconnect-completion-race

Conversation

@davidtaylorhq
Copy link
Copy Markdown

Testem fires the disconnect event even for temporary drops (e.g. CPU contention) as well as terminal exits. Counting those as browser completions is problematic if all other browsers finish before they reconnect, and causes a 'No moduleQueue was set.' error.

This commit drops the disconnect listener and instead hooks runner.finish(), which fires once per browser when testem definitively gives up. Unforunately testem doesn't expose an event for this, hence the monkey-patch.

Fixes #370.

Testem fires the `disconnect` event even for temporary drops (e.g. CPU contention) as well as terminal exits. Counting those as browser completions is problematic if all other browsers finish before they reconnect, and causes a 'No moduleQueue was set.' error.

This commit drops the `disconnect` listener and instead hooks `runner.finish()`, which fires once per browser when testem definitively gives up. Unforunately testem doesn't expose an event for this, hence the monkey-patch.

Fixes ember-cli#370.
davidtaylorhq added a commit to discourse/discourse that referenced this pull request May 28, 2026
This handles transient browser detections more gracefully. See upstream
ember-cli/ember-exam#1515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting No moduleQueue was set when using load-balance

1 participant