Skip to content

Commit

Permalink
add assert error message
Browse files Browse the repository at this point in the history
  • Loading branch information
likexian committed Apr 29, 2024
1 parent d233eed commit 9dd719a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion whois_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ func TestNewClient(t *testing.T) {
c := NewClient()
var err error

c.SetTimeout(10 * time.Microsecond)
c.SetTimeout(10 * time.Millisecond)
_, err = c.Whois("likexian.com")
assert.NotNil(t, err)
assert.Contains(t, err.Error(), "timeout")

c.SetTimeout(10 * time.Second)
_, err = c.Whois("likexian.com")
Expand Down

0 comments on commit 9dd719a

Please sign in to comment.