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 web vital trace test #1262

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Fix web vital trace test #1262

merged 1 commit into from
Apr 22, 2024

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Apr 8, 2024

What?

Catch the web vital spans after the page.close API call is made. This should definitely cause the web vitals to emit and be received in time before the sub-test completes.

Why?

Instead of a sleep to wait for a web vital, which is problematic on slower machines that can cause the sub test to fail, catch the web vital spans that are emitted/received when the page.close() API is called.

I've ran the integration tests 10 times and there were no failures with the tracing tests, whereas usually I would get 2-3 failures.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

#1150

@ankur22 ankur22 requested a review from inancgumus April 8, 2024 12:54
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

Nice 👍

Instead of a sleep to wait for a web vital, which may be delayed for
various reasons, and can cause the sub test to fail, catch the web
vital spans that are emitted/received when the page.close() API is
called.
@ankur22 ankur22 merged commit 0570368 into main Apr 22, 2024
17 checks passed
@ankur22 ankur22 deleted the fix/trace-test branch April 22, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants