Skip to content

Commit

Permalink
nettest: log more details about err for checkForTimeoutError
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ZekeLu authored and gopherbot committed May 16, 2022
1 parent 45b2658 commit 20f9603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nettest/conntest.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,10 @@ func checkForTimeoutError(t *testing.T, err error) {
t.Helper()
if nerr, ok := err.(net.Error); ok {
if !nerr.Timeout() {
t.Errorf("err.Timeout() = false, want true")
t.Errorf("got error: %v, want err.Timeout() = true", nerr)
}
} else {
t.Errorf("got %T, want net.Error", err)
t.Errorf("got %T: %v, want net.Error", err, err)
}
}

Expand Down

0 comments on commit 20f9603

Please sign in to comment.