From 2fa48483af3353041b0e3f212e6b0f84f074a929 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Thu, 4 Aug 2022 09:18:18 -0700 Subject: [PATCH] test: unflake "should retain traces for interrupted tests" (#16235) Ensure both tests start before one of them finishes. --- tests/playwright-test/playwright.trace.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/playwright-test/playwright.trace.spec.ts b/tests/playwright-test/playwright.trace.spec.ts index a247b8186a..5d57398b97 100644 --- a/tests/playwright-test/playwright.trace.spec.ts +++ b/tests/playwright-test/playwright.trace.spec.ts @@ -248,13 +248,14 @@ test('should retain traces for interrupted tests', async ({ runInlineTest }, tes `, 'a.spec.ts': ` pwt.test('test 1', async ({ page }) => { + await page.waitForTimeout(2000); expect(1).toBe(2); }); `, 'b.spec.ts': ` pwt.test('test 2', async ({ page }) => { await page.goto('about:blank'); - await page.waitForTimeout(1000); + await page.waitForTimeout(5000); }); `, }, { workers: 2 });