Skip to content

Commit 20f9603

Browse files
ZekeLugopherbot
authored andcommitted
nettest: log more details about err for checkForTimeoutError
For golang/go#52893 Change-Id: I2897c3f22b670af0aa2df1edbc9bbebdf1bafe59 GitHub-Last-Rev: bdccfc3 GitHub-Pull-Request: #132 Reviewed-on: https://go-review.googlesource.com/c/net/+/406435 Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
1 parent 45b2658 commit 20f9603

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)