test: disable flaky installation test on macos-13 (#12478)

This commit is contained in:
Alex Rudenko 2024-05-22 10:28:49 +02:00 committed by GitHub
parent d83d9a6ae2
commit 97a4951d52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 21 deletions

View File

@ -26,7 +26,8 @@ try {
);
const worker = await workerTarget.worker();
await new Promise(resolve => setTimeout(resolve, 1000));
// See https://crbug.com/341213355
await new Promise(resolve => setTimeout(resolve, 2000));
const result = await worker.evaluate(async url => {
return await globalThis.testConnect(url);

View File

@ -70,28 +70,35 @@ describe('`puppeteer`', () => {
}
});
it('runs in the extension', async function () {
const examplePath = join(this.sandbox, 'puppeteer-in-extension');
fs.cpSync(join(EXAMPLES_DIR, 'puppeteer-in-extension'), examplePath, {
recursive: true,
});
spawnSync('npm', ['ci'], {
cwd: examplePath,
shell: true,
});
spawnSync('npm', ['run', 'build'], {
cwd: examplePath,
shell: true,
});
// Flaky on macos-13.
(platform() === 'darwin' ? it.skip : it)(
'runs in the extension',
async function () {
const examplePath = join(this.sandbox, 'puppeteer-in-extension');
fs.cpSync(join(EXAMPLES_DIR, 'puppeteer-in-extension'), examplePath, {
recursive: true,
});
spawnSync('npm', ['ci'], {
cwd: examplePath,
shell: true,
});
spawnSync('npm', ['run', 'build'], {
cwd: examplePath,
shell: true,
});
const server = await TestServer.create(examplePath);
try {
const script = await readAsset('puppeteer', 'puppeteer-in-extension.js');
await this.runScript(script, 'mjs', [String(server.port)]);
} finally {
await server.stop();
const server = await TestServer.create(examplePath);
try {
const script = await readAsset(
'puppeteer',
'puppeteer-in-extension.js'
);
await this.runScript(script, 'mjs', [String(server.port)]);
} finally {
await server.stop();
}
}
});
);
});
// Skipping this test on Windows as windows runners are much slower.