Does this issue reproduce with the latest release?
Yes (1.17.3)
What operating system and processor architecture are you using (go env)?
Any
What did you do?
Called t.Failed() from a deferred cleanup function registered for a test that panicked (see https://go.dev/play/p/f0Xu8OyA--h).
What did you expect to see?
t.Failed() return true.
What did you see instead?
t.Failed() returned false.
The issue isn't verified if the test has parallel subtests (see https://go.dev/play/p/37YXOUyv5-z). I believe that's because in that case this branch will be ignored, and this closure will call t.Fail() before invoking the cleanup functions .
Does this issue reproduce with the latest release?
Yes (1.17.3)
What operating system and processor architecture are you using (
go env)?Any
What did you do?
Called
t.Failed()from a deferred cleanup function registered for a test that panicked (see https://go.dev/play/p/f0Xu8OyA--h).What did you expect to see?
t.Failed()return true.What did you see instead?
t.Failed()returned false.The issue isn't verified if the test has parallel subtests (see https://go.dev/play/p/37YXOUyv5-z). I believe that's because in that case this branch will be ignored, and this closure will call
t.Fail()before invoking the cleanup functions .