2024-12-03 01:11:08 +03:00
|
|
|
package dns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCache(t *testing.T) {
|
|
|
|
net.DefaultResolver = NewNetResolver(PreferIPV4(true))
|
|
|
|
|
2024-12-09 16:23:25 +03:00
|
|
|
_, err := net.LookupHost("unistack.org")
|
2024-12-03 01:11:08 +03:00
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2024-12-09 00:41:08 +03:00
|
|
|
|
2024-12-09 16:23:25 +03:00
|
|
|
_, err = net.LookupHost("unistack.org")
|
2024-12-09 00:41:08 +03:00
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2024-12-03 01:11:08 +03:00
|
|
|
}
|