diff options
| author | Russ Cox <rsc@golang.org> | 2023-06-13 14:37:57 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-06-13 19:41:21 +0000 |
| commit | 70cb990b15807eb61351b8fbeac28704240787bd (patch) | |
| tree | f00e3751d0aaa5592662ee259a62c5bc745ab060 /src/net/http | |
| parent | ccf75b36ff884c5a6839be143dd4366824c85aca (diff) | |
| download | go-70cb990b15807eb61351b8fbeac28704240787bd.tar.xz | |
database/sql: fix flake in TestContextCancelDuringRawBytesScan
If the cancellation takes effect between Next and Scan,
then Scan returns context.Canceled, but the test wasn't
allowing this case.
The old flake reproduced easily with:
go test -c
stress ./sql.test -test.count=100 -test.run=TestContextCancelDuringRawBytesScan
The new test modes exercise that path directly instead of needing stress.
The new check for context.Canceled fixes the new test mode "top".
Fixes #60445.
Change-Id: I3870039a0fbe0a43c3e261b43b175ef83f818765
Reviewed-on: https://go-review.googlesource.com/c/go/+/502876
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/net/http')
0 files changed, 0 insertions, 0 deletions
