Skip to content

Commit

Permalink
chore(infrastructure): Run 2 parallel browsers by default instead of 3 (
Browse files Browse the repository at this point in the history
material-components#3500)

Running 3 parallel browsers is a waste of resources.

`npm run screenshot:test` captures screenshots in 4 browsers, so it takes the same amount of time to finish whether it run 2 or 3 browsers in parallel.

By only consuming 2 parallels, we free up a VM for someone else to use.

As before, the `--parallels=N` CLI flag can be used to override the default.
  • Loading branch information
acdvorak authored Sep 2, 2018
1 parent 95b6b92 commit 782cd67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/screenshot/infra/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ If a local dev server is not already running, one will be started for the durati
type: 'integer',
description: `
Maximum number of browser VMs to run in parallel (subject to our CBT plan limit and VM availability).
If no value is specified, the default is to start 3 browsers if nobody else is running tests, or 1 browser if other
If no value is specified, the default is to start 2 browsers if nobody else is running tests, or 1 browser if other
tests are already running.
IMPORTANT: To ensure that multiple developers can run their tests simultaneously, DO NOT set this value during normal
business hours.
Expand Down
2 changes: 1 addition & 1 deletion test/screenshot/infra/lib/selenium-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class SeleniumApi {
// If nobody else is running any tests, run half the number of concurrent tests allowed by our CBT account.
// This gives us _some_ parallelism while still allowing other users to run their tests.
if (active === 0) {
return Math.ceil(max / 2);
return Math.floor(max / 2);
}

// If someone else is already running tests, only run one test at a time.
Expand Down

0 comments on commit 782cd67

Please sign in to comment.