Commit a05ff8d6 authored by Ben Joyce's avatar Ben Joyce Committed by Commit Bot

Increase minimum tests classes per shard.

Certain suites like ui_junit_tests and base_junit_tests need less
shards, time differences are more apparent on bots than when run
locally.

Bug: 1138506
Change-Id: I5c5cbf019300f9b438c5d23b996e7d326e8e050d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545570
Auto-Submit: benjamin joyce <bjoyce@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829066}
parent 0758c369
...@@ -48,7 +48,7 @@ _MAX_SHARDS = 10 ...@@ -48,7 +48,7 @@ _MAX_SHARDS = 10
# It can actually take longer to run if you shard too much, especially on # It can actually take longer to run if you shard too much, especially on
# smaller suites. Locally media_base_junit_tests takes 4.3 sec with 1 shard, # smaller suites. Locally media_base_junit_tests takes 4.3 sec with 1 shard,
# and 6 sec with 2 or more shards. # and 6 sec with 2 or more shards.
_MIN_CLASSES_PER_SHARD = 4 _MIN_CLASSES_PER_SHARD = 8
class LocalMachineJunitTestRun(test_run.TestRun): class LocalMachineJunitTestRun(test_run.TestRun):
......
...@@ -58,7 +58,7 @@ class LocalMachineJunitTestRunTests(unittest.TestCase): ...@@ -58,7 +58,7 @@ class LocalMachineJunitTestRunTests(unittest.TestCase):
self.assertEquals(local_machine_junit_test_run._MAX_SHARDS, shards) self.assertEquals(local_machine_junit_test_run._MAX_SHARDS, shards)
# Tests using min_class per shards. # Tests using min_class per shards.
test_classes = [1] * 10 test_classes = [1] * 20
test_shards = 8 test_shards = 8
shards = local_machine_junit_test_run.ChooseNumOfShards( shards = local_machine_junit_test_run.ChooseNumOfShards(
test_classes, test_shards) test_classes, test_shards)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment