Skip to content

Fix unit tests to avoid data race in pipelines #2602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update docs for parallel tests
  • Loading branch information
salonichf5 committed Sep 26, 2024
commit b60945e7b7983ca5a2b78296048d10dd9842698d
2 changes: 2 additions & 0 deletions docs/developer/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ the [Counterfeiter](https://github.com/maxbrunsfeld/counterfeiter) tool. Counter
implementations of internal and public interfaces, allowing us to isolate and control dependencies during testing. It
simplifies the process of mocking and stubbing, making our tests more robust and flexible.

**Parallelize unit tests**: We use `t.Parallel()` to parallelize all unit tests and subtests, allowing us faster execution. To avoid race conditions, each test and subtest is designed to be independent. If a test cannot be parallelized due to sequential dependencies, a comment stating the reason must be provided.

By combining BDD style tests, unit tests, and mock generation, we aim to achieve a comprehensive and maintainable
testing strategy. This approach enables us to ensure the correctness, reliability, and flexibility of our codebase while
promoting efficient refactoring and continuous development.
Expand Down