-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix the protocol timeout configuration for Puppeteer #17095
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
Conversation
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.
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/1c6fccff8219218/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/6d7cecc64dd748e/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/6d7cecc64dd748e/output.txt Total script time: 5.39 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/1c6fccff8219218/output.txt Total script time: 18.28 mins
|
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/ac24bedef465a51/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/fd6761c7c839d2c/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/ac24bedef465a51/output.txt Total script time: 5.37 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/fd6761c7c839d2c/output.txt Total script time: 21.59 mins
|
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/fd00e0c769ff236/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/a1bbec896f4cf40/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/fd00e0c769ff236/output.txt Total script time: 5.49 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/a1bbec896f4cf40/output.txt Total script time: 20.57 mins
|
There was a problem hiding this 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!
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.