Skip to content

tests: default to chrome-launcher path #13912

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

Merged
merged 3 commits into from
Apr 26, 2022
Merged

tests: default to chrome-launcher path #13912

merged 3 commits into from
Apr 26, 2022

Conversation

brendankenny
Copy link
Contributor

If you don't have CHROME_PATH set locally, running api-test-pptr and disconnect-test-pptr fails because a Chrome can't be found for puppeteer to use. Using chrome-launcher's getChromePath() will let a Chrome already installed on the system be used, and it still defaults to CHROME_PATH if it's set.

@brendankenny brendankenny requested a review from a team as a code owner April 26, 2022 16:34
@brendankenny brendankenny requested review from adamraine and removed request for a team April 26, 2022 16:34
@@ -31,12 +31,6 @@ jobs:
- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-all

- name: Define ToT chrome path
Copy link
Contributor Author

@brendankenny brendankenny Apr 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be removed because the tests can then use the stable Chrome already installed on the test runners, but we'll see how that goes :)

The ToT Chrome installation typically takes a whole 6 seconds, so not a big deal if these blocks need to stay instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what's the benefit to using stable chrome vs ToT for these tests? presumably we used ToT for a reason?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least with the ones added in #13783, there is no particular reason for using ToT.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToT lets us catch things early. We'd be losing that with this change. Don't recall if that has ever happened for unit/basics, but def. has for smoke.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't recall if that has ever happened for unit/basics

well ToT has only been used since April 15th, before that it was using the Chromium shipped with puppeteer.

Making tests simpler to run is almost always better, you end up with fewer hidden assumptions (like CHROME_PATH will always be set), but I can leave this in and add a comment it's specifically to catch ToT behavior

@@ -316,7 +317,7 @@ async function run() {
}

const browser = await puppeteer.launch({
executablePath: process.env.CHROME_PATH,
executablePath: getChromePath(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still defaults to CHROME_PATH but is the one I felt less sure about. Let me know if anyone would like it the other way and I can always revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants