testing: panics in example tests abort remaining tests #48009
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
)?Does this issue reproduce with the latest release?
not tested with go 1.17
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
consider a project has two example test cases as shown below:
now run
go test
andgo test -v
What did you expect to see?
go test -v
does not show anyfmt.Println
statements in the example that before panic.this makes it difficult, because I can no longer use
fmt.Println
to debug the issue.What did you see instead?
notice that, in above output
ExampleTwo
is not shown. user may think thatExampleTwo
has passed.but actually it never ran
ExampleTwo
test casein above output i dont see
fmt.Println("x:line1)
output.it means any
fmt.Println
before panic are lost in output.it makes difficult to debug the issue, because developer cannot use
fmt.Println
to investigate why it panickedThe text was updated successfully, but these errors were encountered: