Skip to content

Commit

Permalink
chore: improve test stability for worker-related functionality
Browse files Browse the repository at this point in the history
This commit enhances the stability of tests for worker-related functionality in the process package. The `createWorkerPool` and `createWorkerService` test suites are now marked as sequential to prevent potential race conditions and improve consistency across test runs. This change ensures that worker creation, execution, and termination are performed in a controlled, sequential manner, reducing the likelihood of intermittent test failures due to concurrent worker operations.
shorwood committed Dec 29, 2024
1 parent 4b758f6 commit b64d6ad
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/process/createWorkerPool.test.ts
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ describe.sequential('createWorkerPool', () => {
})
})

describe.sequential('lifecycle', { retry: 3 }, () => {
describe('lifecycle', { retry: 3 }, () => {
it('should instantiate with empty worker list', () => {
const pool = createWorkerPool()
expect(pool.workers).toHaveLength(0)
2 changes: 1 addition & 1 deletion packages/process/createWorkerService.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type * as Module from './__fixtures__/module'
import { createWorkerService, WorkerService } from './createWorkerService'

describe('createWorkerService', () => {
describe.sequential('createWorkerService', () => {
const moduleId = new URL('__fixtures__/module', import.meta.url)

describe('createWorkerService', () => {

0 comments on commit b64d6ad

Please sign in to comment.