Skip to content
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

Fix playwright flakes due to floating promises #28981

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Jan 13, 2025

Fixes #27720

Verified

This commit was signed with the committer’s verified signature.
t3chguy Michael Telatynski
Signed-off-by: Michael Telatynski <[email protected]>
@t3chguy t3chguy added the T-Task Tasks for the team like planning label Jan 13, 2025
@t3chguy t3chguy self-assigned this Jan 13, 2025
@t3chguy t3chguy marked this pull request as ready for review January 13, 2025 14:47
@t3chguy t3chguy requested a review from a team as a code owner January 13, 2025 14:47
@t3chguy t3chguy requested review from dbkr and florianduros January 13, 2025 14:47
@@ -212,7 +212,7 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => {
/* on the bot side, wait for the verifier to exist ... */
const verifier = await awaitVerifier(botVerificationRequest);
// ... confirm ...
botVerificationRequest.evaluate((verificationRequest) => verificationRequest.verifier.verify());
void botVerificationRequest.evaluate((verificationRequest) => verificationRequest.verifier.verify());
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused by the used of void here, why do we need it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because of the no-floating-promises lint rule saying we must either await or void. Here we cannot await as it'd block the control flow due to it blocking until the verification is reciprocated by the Playwright test. We also don't functionally care about the state of the bot, only the state of the Playwright context

@t3chguy t3chguy requested a review from florianduros January 13, 2025 14:52
@t3chguy t3chguy added this pull request to the merge queue Jan 13, 2025
Merged via the queue into develop with commit 1a21b71 Jan 13, 2025
46 checks passed
@t3chguy t3chguy deleted the t3chguy/playwright-flakes-floating-promises branch January 13, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky playwright test: room_options/marked_unread.spec.ts: should mark a room as unread
2 participants