test: unflake "should retain traces for interrupted tests" (#16235)

Ensure both tests start before one of them finishes.
This commit is contained in:
Dmitry Gozman 2022-08-04 09:18:18 -07:00 committed by GitHub
parent 7645ac25a0
commit 2fa48483af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,13 +248,14 @@ test('should retain traces for interrupted tests', async ({ runInlineTest }, tes
`, `,
'a.spec.ts': ` 'a.spec.ts': `
pwt.test('test 1', async ({ page }) => { pwt.test('test 1', async ({ page }) => {
await page.waitForTimeout(2000);
expect(1).toBe(2); expect(1).toBe(2);
}); });
`, `,
'b.spec.ts': ` 'b.spec.ts': `
pwt.test('test 2', async ({ page }) => { pwt.test('test 2', async ({ page }) => {
await page.goto('about:blank'); await page.goto('about:blank');
await page.waitForTimeout(1000); await page.waitForTimeout(5000);
}); });
`, `,
}, { workers: 2 }); }, { workers: 2 });