Closed
Description
Go version
tip
Reproducibility
- Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env
)?
linux/amd64
What did you do?
The refactoring of the testing package in https://go.dev/cl/506755 leads to deadlocks.
One example that triggers this is:
func TestTesting(t *testing.T) { // <=== this is the outer t
t.Run("outer", func(*testing.T) {
t.Run("inner", func(t *testing.zT) { // <=== This is using the outer t
t.Log("Hello World!")
})
})
}
In our Google internal testing we discovered other cases but I don't yet know a minimal reproducer that I can share here. I'll follow up separately.
What did you expect to see?
I expected the test to complete successfully.
What did you see instead?
The tests deadlocks.