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:
Matthias Radestock committed 2015-04-11 20:52:51 +01:00
1 parent e0bba10ead
commit 065b632f91
3 files changed
+11 -4

No files matched your search

+5 -1
View File
@@ -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()