From 351248fabbd89a11d46ed9bd8b77aeb2e94262dc Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Sun, 9 Aug 2020 08:13:24 -0400 Subject: [PATCH] Fix wait times in e2e tests --- test/e2e/annotations/auth.go | 3 ++- test/e2e/framework/framework.go | 1 + test/e2e/gracefulshutdown/shutdown.go | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/e2e/annotations/auth.go b/test/e2e/annotations/auth.go index b8fcc13ac..769246cbb 100644 --- a/test/e2e/annotations/auth.go +++ b/test/e2e/annotations/auth.go @@ -24,6 +24,7 @@ import ( "os/exec" "regexp" "strings" + "time" "github.com/onsi/ginkgo" "github.com/stretchr/testify/assert" @@ -443,7 +444,7 @@ var _ = framework.DescribeAnnotation("auth-*", func() { err := framework.WaitForEndpoints(f.KubeClientSet, framework.DefaultTimeout, framework.HTTPBinService, f.Namespace, 1) assert.Nil(ginkgo.GinkgoT(), err) - framework.Sleep(1) + framework.Sleep(1 * time.Second) e, err := f.KubeClientSet.CoreV1().Endpoints(f.Namespace).Get(context.TODO(), framework.HTTPBinService, metav1.GetOptions{}) assert.Nil(ginkgo.GinkgoT(), err) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 27312ec98..ba58a376b 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -213,6 +213,7 @@ func (f *Framework) WaitForNginxServer(name string, matcher func(cfg string) boo func (f *Framework) WaitForNginxConfiguration(matcher func(cfg string) bool) { err := wait.PollImmediate(Poll, DefaultTimeout, f.matchNginxConditions("", matcher)) assert.Nil(ginkgo.GinkgoT(), err, "waiting for nginx server condition/s") + Sleep(1 * time.Second) } // WaitForNginxCustomConfiguration waits until the nginx configuration given part (from, to) contains a particular configuration diff --git a/test/e2e/gracefulshutdown/shutdown.go b/test/e2e/gracefulshutdown/shutdown.go index 7bec3d85c..da298c5d0 100644 --- a/test/e2e/gracefulshutdown/shutdown.go +++ b/test/e2e/gracefulshutdown/shutdown.go @@ -97,7 +97,7 @@ var _ = framework.IngressNginxDescribe("[Shutdown] ingress controller", func() { result <- resp.StatusCode }() - framework.Sleep(1) + framework.Sleep(1 * time.Second) f.ScaleDeploymentToZero("nginx-ingress-controller") @@ -142,7 +142,7 @@ var _ = framework.IngressNginxDescribe("[Shutdown] ingress controller", func() { result <- resp.StatusCode }() - framework.Sleep(1) + framework.Sleep(1 * time.Second) f.ScaleDeploymentToZero("nginx-ingress-controller")