aboutsummaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorEmmanuel T Odeke <emmanuel@orijtech.com>2020-01-02 02:00:55 -0800
committerEmmanuel Odeke <emm.odeke@gmail.com>2020-01-03 01:36:26 +0000
commitf376b8510ed7884c69a09fbcf61418f7285f2787 (patch)
tree59e805b37767b5be736fe476bcbd79f2ee626be3 /src/database
parenta65f08830151101d4fbb524edfa2bc792932f8cc (diff)
downloadgo-f376b8510ed7884c69a09fbcf61418f7285f2787.tar.gz
go-f376b8510ed7884c69a09fbcf61418f7285f2787.zip
all: fix invalid invocations of Fatalf in goroutines
Found by running the go vet pass 'testinggoroutine' that I started in CL 212920. Change-Id: Ic9462fac85dbafc437fe4a323b886755a67a1efa Reviewed-on: https://go-review.googlesource.com/c/go/+/213097 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/database')
-rw-r--r--src/database/sql/sql_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/database/sql/sql_test.go b/src/database/sql/sql_test.go
index ed0099e0e9..6f59260cda 100644
--- a/src/database/sql/sql_test.go
+++ b/src/database/sql/sql_test.go
@@ -629,7 +629,8 @@ func TestPoolExhaustOnCancel(t *testing.T) {
go func() {
rows, err := db.Query("SELECT|people|name,photo|")
if err != nil {
- t.Fatalf("Query: %v", err)
+ t.Errorf("Query: %v", err)
+ return
}
rows.Close()
saturateDone.Done()
@@ -637,6 +638,9 @@ func TestPoolExhaustOnCancel(t *testing.T) {
}
saturate.Wait()
+ if t.Failed() {
+ t.FailNow()
+ }
state = 2
// Now cancel the request while it is waiting.