From d8ecfb73245499d48c5876a3e1ee94383262023f Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Mon, 23 Mar 2020 18:09:21 -0300 Subject: [PATCH] Wait for update in tcp e2e test (#5284) --- test/e2e/tcpudp/tcp.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/tcpudp/tcp.go b/test/e2e/tcpudp/tcp.go index fac5ee01d..c29390fbe 100644 --- a/test/e2e/tcpudp/tcp.go +++ b/test/e2e/tcpudp/tcp.go @@ -77,9 +77,13 @@ var _ = framework.IngressNginxDescribe("[TCP] tcp-services", func() { Update(svc) 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( 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()