Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warning for high concurrency level (closes #7188) #7271

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/runner/browser-set.ts
Expand Up @@ -17,6 +17,8 @@ import { createList } from '../utils/string';

const RELEASE_TIMEOUT = 10000;

const COUNT_OWN_AND_OUTER_LISTENERS = 3;

export default class BrowserSet extends EventEmitter {
private readonly _browserConnections: BrowserConnection[];
private readonly _browserErrorHandler: (error: Error) => void;
Expand All @@ -39,6 +41,7 @@ export default class BrowserSet extends EventEmitter {
// NOTE: We're setting an empty error handler, because Node kills the process on an 'error' event
// if there is no handler. See: https://nodejs.org/api/events.html#events_class_events_eventemitter
this.on('error', noop);
this.setMaxListeners(COUNT_OWN_AND_OUTER_LISTENERS + this._browserConnections.length);
}

private static async _waitIdle (bc: BrowserConnection): Promise<void> {
Expand Down