Wait for update in tcp e2e test (#5284)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-03-23 18:09:21 -03:00 committed by GitHub
parent 760f40e45c
commit d8ecfb7324
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,9 +77,13 @@ var _ = framework.IngressNginxDescribe("[TCP] tcp-services", func() {
Update(svc) Update(svc)
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error updating service") assert.Nil(ginkgo.GinkgoT(), err, "unexpected error updating service")
// wait for update and nginx reload and new endpoint is available
time.Sleep(5 * time.Second)
f.WaitForNginxConfiguration( f.WaitForNginxConfiguration(
func(cfg string) bool { func(cfg string) bool {
return strings.Contains(cfg, fmt.Sprintf(`ngx.var.proxy_upstream_name="tcp-%v-%v-80"`, f.Namespace, framework.EchoService)) return strings.Contains(cfg, fmt.Sprintf(`ngx.var.proxy_upstream_name="tcp-%v-%v-80"`,
f.Namespace, framework.EchoService))
}) })
ip := f.GetNginxIP() ip := f.GetNginxIP()