aboutsummaryrefslogtreecommitdiff
path: root/lib/dns/dns_test.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2019-12-13 19:40:39 +0700
committerShulhan <m.shulhan@gmail.com>2019-12-18 09:51:54 +0700
commit3a1fe710fafa30e64a57386d31e91cae6cd462a2 (patch)
tree312a7ca9cf934be3b6e48662c47e82f5b4214c37 /lib/dns/dns_test.go
parente9a6eb1e3161fc6a02ba1f267808643bdd7c89ec (diff)
downloadpakakeh.go-3a1fe710fafa30e64a57386d31e91cae6cd462a2.tar.xz
dns: merge Start and Wait into ListenAndServe
Diffstat (limited to 'lib/dns/dns_test.go')
-rw-r--r--lib/dns/dns_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/dns/dns_test.go b/lib/dns/dns_test.go
index 20f697a7..c88bf491 100644
--- a/lib/dns/dns_test.go
+++ b/lib/dns/dns_test.go
@@ -45,14 +45,12 @@ func TestMain(m *testing.M) {
_testServer.LoadMasterFile("testdata/kilabit.info")
- _testServer.Start()
+ go _testServer.ListenAndServe()
// Wait for all listeners running.
time.Sleep(500 * time.Millisecond)
- s := m.Run()
-
- os.Exit(s)
+ os.Exit(m.Run())
}
func TestQueryType(t *testing.T) {