Skip to content

What's the purpose of setting shard_count in java_test? #2113

@GinFungYJF

Description

@GinFungYJF

I want to make "bazel test" run the methods in a single java class concurrently in order to speed up the test. And then, I set the shard_count=n(n is the total number of methods in the java class) in java_test rule. But I found that setting shard_count takes more time than no setting shard_count. So, is the option shard_count aimed at speeding up the test? If not, how could I make "bazel test" run the methods in a single java class concurrently? What's more, my test framework is spring and the Test Runner is JUnit4.

Environment info

  • Operating System:
    ubuntu 14.04

  • Bazel version (output of bazel info release):
    0.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions