-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
py_test with unittest.TestCase
doesn't work with sharding
#18228
Comments
I can confirm switching to
|
@meteorcloudy I noticed the lack of an mtime check before while working in rules_jvm's JUnit 5 runner. This seems quite error-prone as we saw here. Do you think I could reasonably add that check for Bazel 7? |
If by "mtime check" you mean the TEST_SHARD_STATUS_FILE thing, then yeah I think adding it for Bazel 7 is very reasonable. If the runner doesn't touch that file, we can simply fail the test, and the fix is very easy -- just remove |
I'll recommend to add the check, but guard it behind an incompatible flag, then we can even cherry pick it back to 6.x (off by default) so that users can start migrate earlier. |
Description of the bug:
The
shard_count
attribute ofpy_test
doesn't actually do any sharding if you just useunittest.TestCase
, instead it just causes the test to run multiple tests.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
In the Bazel repo:
shard_count = 5
to//examples/py_native:test
bazel test //examples/py_native:test
bazel-testlogs/examples/py_native/test/
Every test log has:
Which operating system are you running Bazel on?
all
What is the output of
bazel info release
?any
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: