From 2b070e1724f785776469101ec7a261db5a6cd252 Mon Sep 17 00:00:00 2001 From: Jerzy Szczepkowski Date: Fri, 9 Dec 2016 12:18:32 +0100 Subject: [PATCH] HPA e2e tests: fixed waiting for service creation. HPA e2e tests: fixed waiting for service creation. Fixes #32512. --- test/e2e/autoscaling_utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/autoscaling_utils.go b/test/e2e/autoscaling_utils.go index 41ea143ec25..b5931d5b8a2 100644 --- a/test/e2e/autoscaling_utils.go +++ b/test/e2e/autoscaling_utils.go @@ -396,7 +396,7 @@ func runServiceAndWorkloadForResourceConsumer(c clientset.Interface, internalCli } framework.ExpectNoError(framework.RunRC(controllerRcConfig)) - // Make sure endpoints are propagated. - // TODO(piosz): replace sleep with endpoints watch. - time.Sleep(10 * time.Second) + // Wait for endpoints to propagate for the controller service. + framework.ExpectNoError(framework.WaitForServiceEndpointsNum( + c, ns, controllerName, 1, startServiceInterval, startServiceTimeout)) }