testing: Parallel subtests killed on panic #38749
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Tested on HEAD, go 1.13 and go 1.14
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run parallel subtests and have one panic.
Also reproducible in the playground
What did you expect to see?
I expected to see that other, parallel running subtests still complete, or at least that their respective Cleanup-functions would run.
What did you see instead?
One subtest panicking takes down the whole test:
Basically, the premise is that a panic only takes down one goroutine.
As
t.Run
runs in separate goroutines, I would have expected thatsubtest-two
still runs to completion. However, oncesubtest-one
calls panic, nothing else is ran except the chain of Cleanup-functions from the test that panics to the root-test.If this is expected behaviour, this should be documented.
If this is unexpected behaviour, this is a bug 🙂
The text was updated successfully, but these errors were encountered: