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 the protocol timeout configuration for Puppeteer #17095

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Oct 8, 2023

The default protocol timeout is 180 seconds according to the documentation at https://pptr.dev/api/puppeteer.browserconnectoptions, but the Jasmine timeout we configure in the individual boot files is 30 seconds. The consequence of this is that if a protocol (CDP) error occurs after 30 seconds Jasmine will fail the test, but the actual protocol error from Puppeteer is raised much later in the context of another test, which causes unrelated failures or tracebacks.

This commit fixes the problem by configuring Puppeteer to always use a lower protocol timeout than the Jasmine timeout so that protocol errors are always raised in the context of the test that actually triggered it.

Fixes the side-effects part of #17087.

The default protocol timeout is 180 seconds according to the
documentation at https://pptr.dev/api/puppeteer.browserconnectoptions,
but the Jasmine timeout we configure in the individual boot files is 30
seconds. The consequence of this is that if a protocol (CDP) error
occurs after 30 seconds Jasmine will fail the test, but the actual
protocol error from Puppeteer is raised much later in the context of
another test, which causes unrelated failures or tracebacks.

This commit fixes the problem by configuring Puppeteer to always use a
lower protocol timeout than the Jasmine timeout so that protocol errors
are always raised in the context of the test that actually triggered it.
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/1c6fccff8219218/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/6d7cecc64dd748e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/6d7cecc64dd748e/output.txt

Total script time: 5.39 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/1c6fccff8219218/output.txt

Total script time: 18.28 mins

  • Integration Tests: FAILED

@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/ac24bedef465a51/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/fd6761c7c839d2c/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/ac24bedef465a51/output.txt

Total script time: 5.37 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/fd6761c7c839d2c/output.txt

Total script time: 21.59 mins

  • Integration Tests: Passed

@timvandermeij timvandermeij marked this pull request as ready for review October 8, 2023 17:04
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/fd00e0c769ff236/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/a1bbec896f4cf40/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/fd00e0c769ff236/output.txt

Total script time: 5.49 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/a1bbec896f4cf40/output.txt

Total script time: 20.57 mins

  • Integration Tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, really nice find; thank you!

@Snuffleupagus Snuffleupagus merged commit b4cd8ad into mozilla:master Oct 9, 2023
3 checks passed
@timvandermeij timvandermeij deleted the protocol-timeout branch October 14, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants