mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05:00
plugin/kubernetes: implement HasSynced() (#1155)
* plugin/kubernetes: wait until api is ready Wait for HasSynced before allowing startup to avoid startup race. Also do a small refactor in findServices() to pull a check out of the loop - only needs to be done once. * sigh
This commit is contained in:
@@ -4,7 +4,6 @@ package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
|
||||
@@ -42,9 +41,6 @@ func TestKubernetesNSExposed(t *testing.T) {
|
||||
}
|
||||
defer server.Stop()
|
||||
|
||||
// Work-around for timing condition that results in no-data being returned in test environment.
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
for _, tc := range dnsTestCasesAllNSExposed {
|
||||
|
||||
c := new(dns.Client)
|
||||
|
||||
Reference in New Issue
Block a user