fix(browser): unflake TestPageOnResponse nil panic - #6258
Open
alirezaedalat wants to merge 1 commit into
Open
Conversation
alirezaedalat
requested review from
inancgumus and
mstoykov
and removed request for
a team
August 6, 2026 17:48
|
alirezaedalat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Signed commits report1 of 1 commit between
This repository requires all commits to be signed. See GitHub docs on commit signature verification. |
alirezaedalat
force-pushed
the
fix/5124-test-page-on-response-flaky
branch
from
August 7, 2026 04:40
4d0f395 to
2b309c4
Compare
Avoid launching an unused Go-level Chromium in TestPageOnResponse so StartIteration is the only browser build, reducing CI IterStart cancellations. Harden ToPromise against nil sobek values and use RunPromise so interrupted runs fail cleanly instead of panicking. Fixes grafana#5124
alirezaedalat
force-pushed
the
fix/5124-test-page-on-response-flaky
branch
from
August 7, 2026 04:42
2b309c4 to
e1b4ea6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TestPageOnResponseviawithSkipLaunch(); the test only needs the HTTP server and the managed browser fromStartIteration. Double launches contributed to flakyerror building browser on IterStart: canceledunder CI load.k6test.ToPromiseagainst a nilsobek.Valueso interrupted event loops fail the test cleanly instead of panicking onExport()(the panic inTestPageOnResponseis flaky #5124).RunPromiseand add a regression unit test for the nil-value path.Fixes #5124
Test plan
go test -run TestToPromiseNilValue ./internal/js/modules/k6/browser/k6ext/k6test/go test -run '^TestPageOnResponse$' ./internal/js/modules/k6/browser/tests/go test -count=10 -parallel 4 -run '^TestPageOnResponse$' ./internal/js/modules/k6/browser/tests/