Skip to content

Fix missing await for asynchronous method calls in the integration tests #19950

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 1 commit into from
May 18, 2025

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented May 18, 2025

The Page.evaluate() and Mouse.click() APIs in Puppeteer both return a promise; see https://pptr.dev/api/puppeteer.page.evaluate and https://pptr.dev/api/puppeteer.mouse.click, and should therefore be awaited before proceeding in tests to make sure that the test's behavior is deterministic and avoid intermittent failures.

The following command was used to find potential places to fix:
grep -nEr "[^await|return] page\." test/integration/*

…tests

The `Page.evaluate()` and `Mouse.click()` APIs in Puppeteer both return
a promise; see https://pptr.dev/api/puppeteer.page.evaluate and
https://pptr.dev/api/puppeteer.mouse.click, and should therefore be
awaited before proceeding in tests to make sure that the test's behavior
is deterministic and avoid intermittent failures.

The following command was used to find potential places to fix:
`grep -nEr "[^await|return] page\." test/integration/*`
@timvandermeij
Copy link
Contributor Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/e7bcd8350945255/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/13f5eafa0bf6ee8/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/e7bcd8350945255/output.txt

Total script time: 12.60 mins

  • Integration Tests: FAILED

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/13f5eafa0bf6ee8/output.txt

Total script time: 31.59 mins

  • Integration Tests: FAILED

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@timvandermeij timvandermeij merged commit 60574fb into mozilla:master May 18, 2025
7 checks passed
@timvandermeij timvandermeij deleted the intermittent-all-await branch May 18, 2025 17:12
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.

3 participants