Skip to content

Run test files concurrently#2299

Open
holyfuchs wants to merge 3 commits intomasterfrom
holyfuchs/parallel-test
Open

Run test files concurrently#2299
holyfuchs wants to merge 3 commits intomasterfrom
holyfuchs/parallel-test

Conversation

@holyfuchs
Copy link
Member

Test files now run in parallel.

On an M4 Mac, 20 files × 100 transactions improved from 88s → 25s. (about 3.5× faster)

Each test file runs in its own isolated runner. The new --jobs flag caps concurrency (default: number of CPU cores).

Also in this PR:

  • Fix data races in lint_test.go and test_test.go caused by shared Flowkit global state
  • Fix a race in settings.loadViper using sync.Once

These fixes were required to validate the concurrent test runner under -race.

Some remaining races originate from upstream dependencies and are unrelated to this PR. They will be addressed in follow-up PRs:

Note: Refactoring testCode into smaller helpers is planned, but will be done in a separate PR to make this review easier.

@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 93.06931% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/test/test.go 93.06% 5 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants