diff --git a/pow/pow_test.go b/pow/pow_test.go index 51dc034..72b63c9 100644 --- a/pow/pow_test.go +++ b/pow/pow_test.go @@ -4,10 +4,16 @@ import ( "fmt" "github.com/stretchr/testify/assert" "testing" + "time" ) func TestGetToken(t *testing.T) { + // 计时开始 + start := time.Now() token, err := GetToken("103.120.18.35", "api.leo.moe", "443") - fmt.Println(token, err) + // 计时结束 + end := time.Now() + fmt.Println("耗时:", end.Sub(start)) + fmt.Println("token:", token) assert.NoError(t, err, "GetToken() returned an error") } diff --git a/util/dns_test.go b/util/dns_test.go index 9730b34..bac2443 100644 --- a/util/dns_test.go +++ b/util/dns_test.go @@ -8,6 +8,6 @@ import ( func TestDNS(t *testing.T) { resolver := DNSSB() - ips, _ := resolver.LookupHost(context.Background(), "www.google.com") + ips, _ := resolver.LookupHost(context.Background(), "www.bing.com") fmt.Println(ips) }