diff options
| author | Damien Neil <dneil@google.com> | 2025-05-28 10:55:26 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-05-29 12:46:41 -0700 |
| commit | 555d425d177db7fa7123779d253aee42980cb8a3 (patch) | |
| tree | 54fc610b8ca812e8d45ff7c179602cc993418032 /src/testing/testing.go | |
| parent | f14f3aae1c3dc382c15d9c3174a037b7d3595009 (diff) | |
| download | go-555d425d177db7fa7123779d253aee42980cb8a3.tar.xz | |
testing, testing/synctest: write bubble errors to parent test log
Ensure that log messages written to the testing.T created by
synctest.Test appear in the test output when a test fails.
Fixes #73902
Change-Id: Ie97f5efe54eb003e6c0a5394c2def4cac1520ecb
Reviewed-on: https://go-review.googlesource.com/c/go/+/676995
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/testing.go')
| -rw-r--r-- | src/testing/testing.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index 85ac1aeb32..43ef9eef09 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -1045,7 +1045,7 @@ func (c *common) destination() *common { c.mu.Lock() defer c.mu.Unlock() - if !c.done { + if !c.done && !c.isSynctest { return c } for parent := c.parent; parent != nil; parent = parent.parent { @@ -2037,7 +2037,6 @@ func testingSynctestTest(t *T, f func(*T)) { }, tstate: t.tstate, } - t2.setOutputWriter() go tRunner(t2, f) if !<-t2.signal { |
