mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(workers): workaround worker execution context flakiness (#2596)
Some of the worker tests were failing on the bots. After investigating, I found one race in the test, and one race upstream in Chromium which I filed upstream as https://crbug.com/846099. But I added a small hack here as a temporary workaround. References #2632
This commit is contained in:
committed by
Andrey Lushnikov
parent
469b910a2d
commit
1c2adf61e9
@@ -1627,8 +1627,9 @@ module.exports.addTests = function({testRunner, expect, puppeteer, DeviceDescrip
|
||||
});
|
||||
describe('Workers', function() {
|
||||
it('Page.workers', async function({page, server}) {
|
||||
await page.goto(server.PREFIX + '/worker/worker.html');
|
||||
await page.waitForFunction(() => !!worker);
|
||||
await Promise.all([
|
||||
new Promise(x => page.once('workercreated', x)),
|
||||
page.goto(server.PREFIX + '/worker/worker.html')]);
|
||||
const worker = page.workers()[0];
|
||||
expect(worker.url()).toContain('worker.js');
|
||||
const executionContext = await worker.executionContext();
|
||||
|
||||
Reference in New Issue
Block a user