Open acud opened 3 years ago
It seems like in both cases you are calling methods on a nil Server object.
In the case of the windows panic the test was constructed like so:
srv, _ := mockdns.NewServer(map[string]mockdns.Zone{
"ipv4.com.": {
A: []string{"192.168.1.34"},
},
"ipv4and6.com.": {
A: []string{"192.168.1.34"},
AAAA: []string{"2001:db8::8a2e:370:1111"},
},
}, false)
defer srv.Close()
... check if the test runs in windows and if yes - t.Skip() it
So the call to srv.Close()
was made after the server was created but before it was patched.
In the case of the mac flake - this is happening on an already modified version of the test, which is doing the patch and unpatch calls, so I'm really not sure why this is happening. The test can be seen here
The obvious possibility is NewServer failing for some reason and returning a nil srv
. Errors should always be checked. Why NewServer fails on Windows is the main question here.
Nice catch. Added the error check but did not manage to get around to actually checking it, but we just got this on the windows CI, right now it seems to be failing with the following:
static_resolver_test.go:105: new mockdns: listen udp4 127.0.0.1:50423: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
I'm not familiar with Windows that much, perhaps CI restricts the use of UDP sockets? Looks like binding on TCP port succeeds but UDP fails.
Aloha again :wave:
We've been seeing a lot of these lately on our windows CI build. It runs without race detector on github actions.