significantly reduce time for test dns servers to shut down
by setting the ReadTimeout to 100ms instead of the default 2s. Closes #547.
This commit is contained in:
1 parent
e0bba10ead
commit
065b632f91
3 files changed
+11
-4
No files matched your search
@@ -86,7 +86,11 @@ func TestServerSimpleQuery(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
listener := &dns.Server{Unsafe: true, PacketConn: multicast, Handler: dns.HandlerFunc(handleMDNS)}
|
||||
listener := &dns.Server{
|
||||
Unsafe: true,
|
||||
PacketConn: multicast,
|
||||
Handler: dns.HandlerFunc(handleMDNS),
|
||||
ReadTimeout: 100 * time.Millisecond}
|
||||
go listener.ActivateAndServe()
|
||||
defer listener.Shutdown()
|
||||
|
||||
|
||||
Reference in new issue
Block a user