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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions tests/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ func TestTracing(t *testing.T) {
"navigation",
},
},
{
name: "web_vital",
js: "sleep(100);", // Wait for async WebVitals processing
spans: []string{
"web_vital",
},
},
{
name: "page.screenshot",
js: "page.screenshot();",
Expand Down Expand Up @@ -147,14 +140,17 @@ func TestTracing(t *testing.T) {
},
},
{
name: "page.close",
js: "page.close()",
name: "web_vital",
js: "page.close();", // on page.close, web vitals are collected and fired/received.
spans: []string{
"web_vital",
"page.close",
},
},
}

// Each sub test depends on the previous sub test, so they cannot be ran
// in parallel.
for _, tc := range testCases {
assertJSInEventLoop(t, vu, tc.js)

Expand Down
Loading