Skip to content

Commit

Permalink
feat(e2e): increase protocol timeout for browser connection (#107)
Browse files Browse the repository at this point in the history
Summary: Increase the default timeout for Chromium protocol to reduce the page crashes with error: 'ProtocolError: HeapProfiler.takeHeapSnapshot timed out'.

Differential Revision: D52739286

fbshipit-source-id: d899f8f504b3d98329448ab11522c44ae4994554
  • Loading branch information
JacksonGL authored and facebook-github-bot committed Jan 16, 2024
1 parent ec905b1 commit 6c82dea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/lib/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ interface BrowserLaunchArgumentOptions {
interface BrowserConnectOptions {
ignoreHTTPSErrors?: boolean;
defaultViewport?: AnyValue | null;
protocolTimeout?: number;
slowMo?: number;
targetFilter?: AnyFunction;
}
Expand Down Expand Up @@ -291,6 +292,7 @@ export class MemLabConfig {
this.puppeteerConfig = {
headless: !this._isHeadfulBrowser,
devtools: this.openDevtoolsConsole,
protocolTimeout: constant.defaultProtocolTimeout,
// IMPORTANT: test ContinuousTest before change this config
ignoreHTTPSErrors: true,
// Support running on Windows
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/lib/Constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const constants = {
internalDir: 'fb-internal',
monoRepoDir: '',
defaultUserAgent: 'default',
defaultProtocolTimeout: 5 * 60 * 1000,
V8SyntheticRoots: [
'(GC roots)',
'(Internalized strings)',
Expand Down

0 comments on commit 6c82dea

Please sign in to comment.