Skip to content

Commit

Permalink
nettest: log more details about err for checkForTimeoutError
Browse files Browse the repository at this point in the history
  • Loading branch information
ZekeLu committed May 14, 2022
1 parent 9564170 commit bdccfc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nettest/conntest.go
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 bdccfc3

Please sign in to comment.