Skip to content

TestPageOnResponse is flaky #5124

@inancgumus

Description

@inancgumus

The test randomly fails with a nil pointer panic:

--- FAIL: TestPageOnResponse (0.70s)
    page_test.go:2556: 
        	Error Trace:	/home/runner/work/k6/k6/internal/js/modules/k6/browser/tests/page_test.go:2556
        	Error:      	Received unexpected error:
        	            	error building browser on IterStart: canceled at <eval>:1:1(0)
        	Test:       	TestPageOnResponse
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1a393e3]

goroutine 493 [running]:
testing.tRunner.func1.2({0x1e015e0, 0x2f373b0})
	/home/runner/sdk/gotip/src/testing/testing.go:1874 +0x419
testing.tRunner.func1()
	/home/runner/sdk/gotip/src/testing/testing.go:1877 +0x67f
panic({0x1e015e0?, 0x2f373b0?})
	/home/runner/sdk/gotip/src/runtime/panic.go:858 +0x13a
go.k6.io/k6/internal/js/modules/k6/browser/k6ext/k6test.ToPromise({0x2303030, 0xc0002cddc0}, {0x0, 0x0})
	/home/runner/work/k6/k6/internal/js/modules/k6/browser/k6ext/k6test/vu.go:167 +0x63
go.k6.io/k6/internal/js/modules/k6/browser/tests.TestPageOnResponse(0xc0002cddc0)
	/home/runner/work/k6/k6/internal/js/modules/k6/browser/tests/page_test.go:2558 +0x529
testing.tRunner(0xc0002cddc0, 0x20995a0)
	/home/runner/sdk/gotip/src/testing/testing.go:1936 +0x21d
created by testing.(*T).Run in goroutine 1
	/home/runner/sdk/gotip/src/testing/testing.go:1999 +0x9d3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions