Skip to content

Commit bdccfc3

Browse files
committed
nettest: log more details about err for checkForTimeoutError
1 parent 9564170 commit bdccfc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nettest/conntest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,10 @@ func checkForTimeoutError(t *testing.T, err error) {
398398
t.Helper()
399399
if nerr, ok := err.(net.Error); ok {
400400
if !nerr.Timeout() {
401-
t.Errorf("err.Timeout() = false, want true")
401+
t.Errorf("got error: %v, want err.Timeout() = true", nerr)
402402
}
403403
} else {
404-
t.Errorf("got %T, want net.Error", err)
404+
t.Errorf("got %T: %v, want net.Error", err, err)
405405
}
406406
}
407407

0 commit comments

Comments
 (0)