From 2858ca95d83750f5a27800b454dcebe18af750bc Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 23 May 2023 13:31:23 -0700 Subject: [PATCH] tet: unflake some test runner tests (#23240) - `unhandled rejection during beforeAll should be reported and prevent more tests` had timeout of 100ms that is too short on busy system; - `runTSC` is always slow, so mark as such. --- tests/playwright-test/hooks.spec.ts | 2 +- tests/playwright-test/playwright-test-fixtures.ts | 2 ++ tests/playwright-test/types-2.spec.ts | 2 -- tests/playwright-test/types.spec.ts | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/playwright-test/hooks.spec.ts b/tests/playwright-test/hooks.spec.ts index 3a61cfbf85..2481a824c9 100644 --- a/tests/playwright-test/hooks.spec.ts +++ b/tests/playwright-test/hooks.spec.ts @@ -673,7 +673,7 @@ test('unhandled rejection during beforeAll should be reported and prevent more t Promise.resolve().then(() => { throw new Error('Oh my'); }); - await new Promise(f => setTimeout(f, 100)); + await new Promise(f => setTimeout(f, 1000)); }); test.afterAll(() => { console.log('\\n%%afterAll'); diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.ts index 1b4172e0fa..86da01b10f 100644 --- a/tests/playwright-test/playwright-test-fixtures.ts +++ b/tests/playwright-test/playwright-test-fixtures.ts @@ -296,6 +296,8 @@ export const test = base }, runTSC: async ({ childProcess }, use, testInfo) => { + testInfo.slow(); + await use(async files => { const baseDir = await writeFiles(testInfo, { 'tsconfig.json': JSON.stringify(TSCONFIG), ...files }, true); const tsc = childProcess({ diff --git a/tests/playwright-test/types-2.spec.ts b/tests/playwright-test/types-2.spec.ts index 1273afa110..25fa0f1e0c 100644 --- a/tests/playwright-test/types-2.spec.ts +++ b/tests/playwright-test/types-2.spec.ts @@ -16,8 +16,6 @@ import { test, expect } from './playwright-test-fixtures'; -test.slow(); - test('basics should work', async ({ runTSC }) => { const result = await runTSC({ 'a.spec.ts': ` diff --git a/tests/playwright-test/types.spec.ts b/tests/playwright-test/types.spec.ts index ec7dc9d37c..893596ca09 100644 --- a/tests/playwright-test/types.spec.ts +++ b/tests/playwright-test/types.spec.ts @@ -16,8 +16,6 @@ import { test, expect } from './playwright-test-fixtures'; -test.slow(); - test('should check types of fixtures', async ({ runTSC }) => { const result = await runTSC({ 'helper.ts': `