From a214e641754e2fbb95d2c5d6ca37fc6d636f74b0 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Wed, 3 Oct 2018 11:42:54 -0700 Subject: [PATCH] tests: Reduce time for polling in functional tests Reviewed-by: James Valleroy --- functional_tests/support/service.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/functional_tests/support/service.py b/functional_tests/support/service.py index 0753f594d..aa5d6436f 100644 --- a/functional_tests/support/service.py +++ b/functional_tests/support/service.py @@ -49,13 +49,14 @@ def is_not_running(browser, service_name): def eventually(function, args=[], timeout=30): """Execute a function returning a boolean expression till it returns True or a timeout is reached""" - counter = 1 - while counter < timeout: + waited_time = 0 + while waited_time < timeout: if function(*args): return True - else: - counter += 1 - sleep(1) + + sleep(0.1) + waited_time += 0.1 + return False