From 27684ea195641ead8a8f08cb345925da889a12ed Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Thu, 14 Jan 2021 14:38:55 -0800 Subject: testing: print late arriving log line in panic When you log after a test has completed, the testing package panics. Print the logged line as part of that panic, to aid in debugging. Change-Id: I3d6689d1eed57c03e300afe37db0c15b2f4acda4 Reviewed-on: https://go-review.googlesource.com/c/go/+/283972 Trust: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- src/testing/testing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing/testing.go') diff --git a/src/testing/testing.go b/src/testing/testing.go index 80354d5ce8..466dd96981 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -762,7 +762,7 @@ func (c *common) logDepth(s string, depth int) { return } } - panic("Log in goroutine after " + c.name + " has completed") + panic("Log in goroutine after " + c.name + " has completed: " + s) } else { if c.chatty != nil { if c.bench { -- cgit v1.3