diff --git a/test/e2e/dedicated_loadbalancer_test.go b/test/e2e/dedicated_loadbalancer_test.go index 2f6c0813a..8838c35a6 100644 --- a/test/e2e/dedicated_loadbalancer_test.go +++ b/test/e2e/dedicated_loadbalancer_test.go @@ -127,7 +127,6 @@ var _ = ginkgo.Describe("dedicated ELB service test with the specified ID", func if vpcOpts.SubnetID == "" { return } - framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name) if service1 != nil { framework.RemoveService(kubeClient, service1.Namespace, service1.Name) framework.WaitServiceDisappearOnCluster(kubeClient, service1.Namespace, service1.Name) @@ -137,6 +136,8 @@ var _ = ginkgo.Describe("dedicated ELB service test with the specified ID", func framework.WaitServiceDisappearOnCluster(kubeClient, service2.Namespace, service2.Name) } + framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name) + sharedElbClient := wrapper.SharedLoadBalanceClient{AuthOpts: authOpts} _, err := sharedElbClient.GetInstance(*elbID) gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) diff --git a/test/e2e/shared_loadbalancer_test.go b/test/e2e/shared_loadbalancer_test.go index 1b7f8c1db..ed5c3608b 100644 --- a/test/e2e/shared_loadbalancer_test.go +++ b/test/e2e/shared_loadbalancer_test.go @@ -208,7 +208,6 @@ var _ = ginkgo.Describe("Use an existing shared load balancer (TCP) service test if vpcOpts.SubnetID == "" { return } - framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name) if service1 != nil { framework.RemoveService(kubeClient, service1.Namespace, service1.Name) framework.WaitServiceDisappearOnCluster(kubeClient, service1.Namespace, service1.Name) @@ -218,6 +217,8 @@ var _ = ginkgo.Describe("Use an existing shared load balancer (TCP) service test framework.WaitServiceDisappearOnCluster(kubeClient, service2.Namespace, service2.Name) } + framework.RemoveDeployment(kubeClient, deployment.Namespace, deployment.Name) + sharedElbClient := wrapper.SharedLoadBalanceClient{AuthOpts: authOpts} _, err := sharedElbClient.GetInstance(*elbID) gomega.Expect(err).ShouldNot(gomega.HaveOccurred())