mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 10:13:14 -05:00
plugin/health : rework overloaded goroutine to support graceful shutdown (#5244)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func TestHealth(t *testing.T) {
|
||||
h := &health{Addr: ":0", stop: make(chan bool)}
|
||||
h := &health{Addr: ":0"}
|
||||
|
||||
if err := h.OnStartup(); err != nil {
|
||||
t.Fatalf("Unable to startup the health server: %v", err)
|
||||
@@ -37,7 +37,7 @@ func TestHealth(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHealthLameduck(t *testing.T) {
|
||||
h := &health{Addr: ":0", stop: make(chan bool), lameduck: 250 * time.Millisecond}
|
||||
h := &health{Addr: ":0", lameduck: 250 * time.Millisecond}
|
||||
|
||||
if err := h.OnStartup(); err != nil {
|
||||
t.Fatalf("Unable to startup the health server: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user