From 9dd719abca27f442d0188d908bb5b2c2eb0e42e1 Mon Sep 17 00:00:00 2001 From: Li Kexian Date: Mon, 29 Apr 2024 10:25:01 +0800 Subject: [PATCH] add assert error message --- whois_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whois_test.go b/whois_test.go index 32bbcf9..f9491cd 100644 --- a/whois_test.go +++ b/whois_test.go @@ -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")