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:
Miek Gieben
2017-10-20 22:53:17 +01:00
committed by GitHub
parent c1f67493de
commit d64b684831
13 changed files with 36 additions and 41 deletions

View File

@@ -279,8 +279,7 @@ func doIntegrationTests(t *testing.T, corefile string, testCases []test.Case) {
}
defer server.Stop()
// Work-around for timing condition that results in no-data being returned in test environment.
time.Sleep(3 * time.Second)
time.Sleep(1 * time.Second)
for _, tc := range testCases {