diff options
author | 2018-04-21 18:59:35 +0100 | |
---|---|---|
committer | 2018-04-21 18:59:35 +0100 | |
commit | a466bb6fc61f43be36fd3f51f768df1355c1e600 (patch) | |
tree | 9db1921f1777d345eed6353f55a338f8413bec2f /test/reload_test.go | |
parent | acbcad7b4ed0f7e0e5f4d6ec6b23509d41b92950 (diff) | |
download | coredns-a466bb6fc61f43be36fd3f51f768df1355c1e600.tar.gz coredns-a466bb6fc61f43be36fd3f51f768df1355c1e600.tar.zst coredns-a466bb6fc61f43be36fd3f51f768df1355c1e600.zip |
Export metrics in setup; so it also works after reload (#1715)
* brr; a sleep
* Shouldnt need a query
Diffstat (limited to 'test/reload_test.go')
-rw-r--r-- | test/reload_test.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/reload_test.go b/test/reload_test.go index e49628614..44dcbe591 100644 --- a/test/reload_test.go +++ b/test/reload_test.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "net/http" "testing" + "time" "github.com/miekg/dns" ) @@ -93,13 +94,7 @@ func TestReloadMetricsHealth(t *testing.T) { } defer c1.Stop() - // Send query to trigger monitoring to export on the new process - udp, _ := CoreDNSServerPorts(c1, 0) - m := new(dns.Msg) - m.SetQuestion("example.org.", dns.TypeA) - if _, err := dns.Exchange(m, udp); err != nil { - t.Fatal(err) - } + time.Sleep(1 * time.Second) // Health resp, err := http.Get("http://localhost:53184/health") |