diff options
| author | Daniel S. Fava <danielsfava@gmail.com> | 2021-02-12 09:54:50 +0100 |
|---|---|---|
| committer | Bryan C. Mills <bcmills@google.com> | 2021-02-23 22:14:38 +0000 |
| commit | aaed6cbced238030053df4e54f676a1d59df89d7 (patch) | |
| tree | e3d848e2bdc08ec0e7d106ed7b7c383dceccc04b /src/database/sql/sql_test.go | |
| parent | fbed561f8a596ddbd2bb599a17ea3c6e0b223602 (diff) | |
| download | go-aaed6cbced238030053df4e54f676a1d59df89d7.tar.xz | |
testing/race: fixing intermittent test failure
Test NoRaceMutexPureHappensBefore in runtime/race/testdata/mutex_test.go
expects the second spawned goroutine to run after the first. The test
attempts to force this scheduling with a 10 millisecond wait. Following
a suggestion by Bryan Mills, we force this scheduling using a shared
variable whose access take place within the existing mutex.
Fixes #35745.
Change-Id: Ib23ec51492ecfeed4752e020401dd25755a669ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/291292
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions
