Skip to content
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

Automatically setting shard_count on go_test based on t.Parallel() calls #1997

Open
yushan26 opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1996
Open

Automatically setting shard_count on go_test based on t.Parallel() calls #1997

yushan26 opened this issue Dec 17, 2024 · 0 comments · May be fixed by #1996

Comments

@yushan26
Copy link

Bazel may not necessarily schedule tests cases under target in parallel and may assign one core to a target. This means that tests running in t.Parallel may run sequentially. To make sure that the test cases are truly parallelized on heavily loaded machines, you should instead set shard_count on the go_test target. We can automatically setting shard_count on go_test based on the number of t.Parallel() calls at the top level function. This matches what people expects under go test.

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 a pull request may close this issue.

1 participant