From fde0a8884f57bd2383418e9556cc541450e431c6 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Mon, 27 Jul 2015 11:40:07 -0400 Subject: [PATCH] e2e: Test load-balanced service endpoint preserved Previously we weren't preserving the service endpoint on a load-balanced service, at least on AWS. The test had to test reality, not aspirations! Now we should have fixed this, so we can revert the e2e test to check that the service endpoint is indeed preserved. Fixes #11002 --- test/e2e/service.go | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/test/e2e/service.go b/test/e2e/service.go index 043337517ac..c09ae48dbfc 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -586,21 +586,15 @@ var _ = Describe("Services", func() { if len(service.Status.LoadBalancer.Ingress) != 1 { Failf("got unexpected len(Status.LoadBalancer.Ingresss) for NodePort service: %v", service) } + + // TODO: Make this less of a hack. Watch for events? + Logf("Waiting 2 minutes to give service time to settle after changing configuration") + time.Sleep(time.Second * 120) + service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name) + Expect(err).NotTo(HaveOccurred()) + ingress2 := service.Status.LoadBalancer.Ingress[0] - - // TODO: Fix the issue here: http://issue.k8s.io/11002 - if providerIs("aws") { - // TODO: Make this less of a hack (or fix the underlying bug) - time.Sleep(time.Second * 120) - service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name) - Expect(err).NotTo(HaveOccurred()) - - // We don't want the ingress point to change, but we should verify that the new ingress point still works - ingress2 = service.Status.LoadBalancer.Ingress[0] - Expect(ingress1).NotTo(Equal(ingress2)) - } else { - Expect(ingress1).To(Equal(ingress2)) - } + Expect(ingress1).To(Equal(ingress2)) By("hitting the pod through the service's updated NodePort") testReachable(ip, nodePort2)