Implement a delay for Chrome protocol calls in the integration tests
In Chrome protocol calls are faster than in Firefox and thus trigger in quicker succession. This can cause intermittent failures because new protocol calls can run before events triggered by the previous protocol calls had a chance to be processed (essentially causing events to get lost). This commit fixes the issue by configuring Chrome with a protocol call delay value that gives it a more similar execution speed as Firefox (which also gives us more consistency between the two browser runs). Note that this doesn't negatively impact the overall runtime of the integration tests because Puppeteer already waits for a test to complete in both browsers before continuing to the next one and Chrome consistently was, and with this patch still slightly is, faster in completing the tests.
This commit is contained in:
parent
c6bd044438
commit
7294377cd9
@ -910,6 +910,14 @@ async function startBrowser({
|
||||
// crashes with timeouts or OOM if WebDriver BiDi is used (issue #17961).
|
||||
options.protocol = "cdp";
|
||||
|
||||
// Slow down protocol calls by the given number of milliseconds. In Chrome
|
||||
// protocol calls are faster than in Firefox and thus trigger in quicker
|
||||
// succession. This can cause intermittent failures because new protocol
|
||||
// calls can run before events triggered by the previous protocol calls had
|
||||
// a chance to be processed (essentially causing events to get lost). This
|
||||
// value gives Chrome a more similar execution speed as Firefox.
|
||||
options.slowMo = 5;
|
||||
|
||||
// avoid crash
|
||||
options.args = ["--no-sandbox", "--disable-setuid-sandbox"];
|
||||
// silent printing in a pdf
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user