Merge pull request #119824 from aojea/deflake_TestCreateHealthcheck

fix race creating etcd client for healthchecks
This commit is contained in:
Kubernetes Prow Robot 2023-08-21 02:49:33 -07:00 committed by GitHub
commit f46583dcaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,10 +157,10 @@ func newETCD3Check(c storagebackend.Config, timeout time.Duration, stopCh <-chan
var prober *etcd3ProberMonitor
clientErr := fmt.Errorf("etcd client connection not yet established")
go wait.PollUntil(time.Second, func() (bool, error) {
newProber, err := newETCD3ProberMonitor(c)
go wait.PollImmediateUntil(time.Second, func() (bool, error) {
lock.Lock()
defer lock.Unlock()
newProber, err := newETCD3ProberMonitor(c)
// Ensure that server is already not shutting down.
select {
case <-stopCh: