]> Cypherpunks.ru repositories - gostls13.git/commit
testing: reject calls to Run within Cleanup callbacks
authorChangkun Ou <hi@changkun.de>
Mon, 27 Sep 2021 09:37:56 +0000 (11:37 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 16 Nov 2022 14:42:36 +0000 (14:42 +0000)
commit978ce7e252b0d6ff0a19f66206ed5f3eca281059
tree6a32a053f319b961fdbcdbe5f91686250b45d798
parent7c8c209b45ebe5c3d7979c44e53216f61e8b5f2a
testing: reject calls to Run within Cleanup callbacks

Calling t.Run inside t.Cleanup can mess up the execution order of
registered Cleanup callbacks. Reject calls to Run within Cleanup
callbacks.

Fixes #48515

Change-Id: I61e4cb35253db1a8bbe3351d59055433030aa289
Reviewed-on: https://go-review.googlesource.com/c/go/+/352349
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Run-TryBot: Changkun Ou <mail@changkun.de>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/testing/panic_test.go
src/testing/testing.go