Skip to content

Ci stability #4914

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 4 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
go version
export GOMAXPROCS=2
args=("-p" "2" "-race")
# Run with less concurrency on Windows/MacOS to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
unset args[2]
args[1]="1"
export GOMAXPROCS=1
Expand Down Expand Up @@ -92,8 +92,8 @@ jobs:
go version
export GOMAXPROCS=2
args=("-p" "2" "-race")
# Run with less concurrency on Windows/MacOS to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
unset args[2]
args[1]="1"
export GOMAXPROCS=1
Expand Down Expand Up @@ -131,8 +131,8 @@ jobs:
go version
export GOMAXPROCS=2
args=("-p" "2" "-race")
# Run with less concurrency on Windows/MacOS to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then
# Run with less concurrency on Windows/MacOS/ARM to minimize flakiness.
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* || "${{ matrix.platform }}" == *arm ]]; then
unset args[2]
args[1]="1"
export GOMAXPROCS=1
Expand Down
18 changes: 10 additions & 8 deletions internal/js/modules/k6/browser/tests/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"github.com/grafana/sobek"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
k6metrics "go.k6.io/k6/metrics"

"go.k6.io/k6/internal/js/modules/k6/browser/common"
"go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test"
"go.k6.io/k6/metrics"
)

type emulateMediaOpts struct {
Expand Down Expand Up @@ -248,6 +248,8 @@ func TestPageEvaluateMapping(t *testing.T) {
tt.script,
)
assert.Equal(t, tb.vu.ToSobekValue(tt.want), got.Result())
// Test script as string input
_ = tb.vu.RunPromise(t, `await p.close()`)
})
}
}
Expand Down Expand Up @@ -1762,14 +1764,11 @@ func TestPageIsHidden(t *testing.T) {
}
}

func TestShadowDOMAndDocumentFragment(t *testing.T) { //nolint:tparallel
func TestShadowDOMAndDocumentFragment(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip() // timeouts
t.Skip("windows timeouts on these tests")
}

tb := newTestBrowser(t, withFileServer())

tests := []struct {
name string
selector string
Expand All @@ -1796,8 +1795,10 @@ func TestShadowDOMAndDocumentFragment(t *testing.T) { //nolint:tparallel
},
}

for _, tt := range tests { //nolint:paralleltest
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
tb := newTestBrowser(t, withFileServer())
tb.vu.ActivateVU()
tb.vu.StartIteration(t)
defer tb.vu.EndIteration(t)
Expand All @@ -1813,6 +1814,7 @@ func TestShadowDOMAndDocumentFragment(t *testing.T) { //nolint:tparallel
});

const text = await s.innerText();
await p.close()
return text;
`, tb.staticURL("shadow_and_doc_frag.html"), tt.selector)
assert.Equal(t, tt.want, got.Result().String())
Expand Down Expand Up @@ -2085,7 +2087,7 @@ func TestPageOnMetric(t *testing.T) {

done := make(chan bool)

samples := make(chan k6metrics.SampleContainer)
samples := make(chan metrics.SampleContainer)
// This page will perform many pings with a changing h query parameter.
// This URL should be grouped according to how page.on('metric') is used.
tb := newTestBrowser(t, withHTTPServer(), withSamples(samples))
Expand Down
2 changes: 1 addition & 1 deletion internal/js/tc55/timers/timers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func TestSetIntervalOrder(t *testing.T) {
clearInterval(two);
clearInterval(three);
clearInterval(last);
}, 4);
}, 10);
var three = setInterval((_) => print("three"), 1);
print("outside");
`)
Expand Down
Loading