Skip to content

Commit eef29ab

Browse files
committed
test: disable parallelism
- avoid Musicbrainz rate limiting - avoid race condition when creating test entities
1 parent 957b750 commit eef29ab

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/test-support/src/test-config.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import {UserscriptTestOptions} from '#userscript-test.ts';
12
import {defineConfig as defineTestConfig, devices, type PlaywrightTestConfig} from '@playwright/test';
23
import dotenv from 'dotenv';
34
import path from 'path';
4-
import {UserscriptTestOptions} from '#userscript-test.ts';
55

66
/**
77
* Read environment variables from file.
@@ -14,14 +14,12 @@ dotenv.config({path: path.resolve(import.meta.dirname, '..', '..', '..', '.env')
1414
*/
1515
export function defineConfig(baseURL: string, userscriptPath: string, options?: PlaywrightTestConfig) {
1616
return defineTestConfig<UserscriptTestOptions>({
17-
/* Run tests in files in parallel */
18-
fullyParallel: true,
1917
/* Fail the build on CI if you accidentally left test.only in the source code. */
2018
forbidOnly: !!process.env.CI,
2119
/* Retry on CI only */
2220
retries: process.env.CI ? 2 : 0,
23-
/* Opt out of parallel tests on CI. */
24-
workers: process.env.CI ? 1 : undefined,
21+
/* Can't run in parallel due to Musicbrainz rate limit */
22+
workers: 1,
2523
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2624
reporter: 'html',
2725
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

0 commit comments

Comments
 (0)