Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Balance pytest test sharding #8108
The pytest test sharding plugin uses mod of test index over the number of shards to balance across shards. That works fine when there are a lot more tests than shards, which used to ~always be the case... until we turned on
The effect was that we biased toward overloading lower shard counts (because targets with less than a dozen test methods are very common).
Balance across shards by hashing the pytest item "nodeid" (used elsewhere in this file for item display).
Fewer straggling shards in travis.