Tweak the protocol timeout configuration for Puppeteer

The previous change that set the timeout had effect because we have seen
quite a few protocol timeouts now correctly being raised in the context
of the active test, however we have also still seen a handful of cases
where this wasn't the case and the one second difference turned out to
be too low (likely because the operation was started slightly after one
second into the test run). We therefore tweak the value to be 75% of the
Jasmine timeout. This should be enough to catch operations that happen
later on in the test run, and if a single operation takes that long any
hope for success is already gone anyway.
This commit is contained in:
Tim van der Meij 2023-10-14 18:05:44 +02:00
parent 48e41617f5
commit 0c763d6c5a
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762

View File

@ -910,8 +910,11 @@ async function startBrowser(browserName, startUrl = "") {
// The timeout for individual protocol (CDP) calls should always be lower // The timeout for individual protocol (CDP) calls should always be lower
// than the Jasmine timeout. This way protocol errors are always raised in // than the Jasmine timeout. This way protocol errors are always raised in
// the context of the tests that actually triggered them and don't leak // the context of the tests that actually triggered them and don't leak
// through to other tests (causing unrelated failures or tracebacks). // through to other tests (causing unrelated failures or tracebacks). The
protocolTimeout: /* jasmine.DEFAULT_TIMEOUT_INTERVAL = */ 30000 - 1000, // timeout is set to 75% of the Jasmine timeout to catch operation errors
// later in the test run and because if a single operation takes that long
// it can't possibly succeed anymore.
protocolTimeout: 0.75 * /* jasmine.DEFAULT_TIMEOUT_INTERVAL = */ 30000,
}; };
if (!tempDir) { if (!tempDir) {