File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -629,14 +629,18 @@ func TestPoolExhaustOnCancel(t *testing.T) {
629
629
go func () {
630
630
rows , err := db .Query ("SELECT|people|name,photo|" )
631
631
if err != nil {
632
- t .Fatalf ("Query: %v" , err )
632
+ t .Errorf ("Query: %v" , err )
633
+ return
633
634
}
634
635
rows .Close ()
635
636
saturateDone .Done ()
636
637
}()
637
638
}
638
639
639
640
saturate .Wait ()
641
+ if t .Failed () {
642
+ t .FailNow ()
643
+ }
640
644
state = 2
641
645
642
646
// Now cancel the request while it is waiting.
Original file line number Diff line number Diff line change @@ -998,12 +998,16 @@ func TestConcurrentPreferGoResolversDial(t *testing.T) {
998
998
defer wg .Done ()
999
999
_ , err := r .LookupIPAddr (context .Background (), "google.com" )
1000
1000
if err != nil {
1001
- t .Fatalf ("lookup failed for resolver %d: %q" , index , err )
1001
+ t .Errorf ("lookup failed for resolver %d: %q" , index , err )
1002
1002
}
1003
1003
}(resolver .Resolver , i )
1004
1004
}
1005
1005
wg .Wait ()
1006
1006
1007
+ if t .Failed () {
1008
+ t .FailNow ()
1009
+ }
1010
+
1007
1011
for i , resolver := range resolvers {
1008
1012
if ! resolver .dialed {
1009
1013
t .Errorf ("custom resolver %d not dialed during lookup" , i )
Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ func TestTimerStopStress(t *testing.T) {
356
356
for i := 0 ; i < 100 ; i ++ {
357
357
go func (i int ) {
358
358
timer := AfterFunc (2 * Second , func () {
359
- t .Fatalf ("timer %d was not stopped" , i )
359
+ t .Errorf ("timer %d was not stopped" , i )
360
360
})
361
361
Sleep (1 * Second )
362
362
timer .Stop ()
You can’t perform that action at this time.
0 commit comments