smartystreets / goconvey

Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
http://smartystreets.github.io/goconvey/
Other
8.25k stars 555 forks source link

panics upon test failure #589

Open harkamals opened 4 years ago

harkamals commented 4 years ago

Convey panics upon test failure, whereas it should report it, without panicking. What might be wrong here, or panic is it's normal behavior ?!

go version go1.13.4 windows/amd64

Convey("sample test run", t, func() { So(1, ShouldEqual,2) }) (some file paths truncated)

c:/.../rds_test.go Line 42: Expected: '2' Actual: '1' (Should be equal) goroutine 7 [running]: infra.TestRds.func1() rds_test.go:42 +0x86 github.com/jtolds/gls.(ContextManager).SetValues.func1(0x0) .../vendor/github.com/jtolds/gls/context.go:97 +0x46d github.com/jtolds/gls.EnsureGoroutineId.func1() .../vendor/github.com/jtolds/gls/gid.go:24 +0x35 github.com/jtolds/gls._m(0x0, 0xc000004600) .../vendor/github.com/jtolds/gls/stack_tags.go:108 +0x38 github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0xc000004600) .../vendor/github.com/jtolds/gls/stack_tags.go:56 +0x3c github.com/jtolds/gls.addStackTag(...) .../vendor/github.com/jtolds/gls/stack_tags.go:49 github.com/jtolds/gls.EnsureGoroutineId(0xc00005a690) .../github.com/jtolds/gls/gid.go:24 +0xe6 github.com/jtolds/gls.(ContextManager).SetValues(0xc0000444b0, 0xc00005a630, 0xc0000045c0) .../vendor/github.com/jtolds/gls/context.go:63 +0x152 sc-infra-testing.TestRds(0xc0000aa100) .../rds_test.go:40 +0xae testing.tRunner(0xc0000aa100, 0x5dee70) .../go_1.13.4/src/testing/testing.go:909 +0xd0 created by testing.(*T).Run .../go_1.13.4/src/testing/testing.go:960 +0x357

miketonks commented 4 years ago

Could be duplicate of https://github.com/smartystreets/goconvey/issues/566

It's not a panic, just printing out stack trace on failure. Probably this should be optional, and default to off.