From d698a18781f112fc50341d3733bdf172cae02bc8 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Thu, 6 Apr 2023 09:50:38 +0200 Subject: [PATCH] Fix request interval in _wait_for_lb_functional The request_interval parameter is passed to the _wait_for_lb_functional function but it wasn't used in the function. Now the function sleeps for request_interval sec for each iteration of the loop. It mitigates some random failures with the TCP listener + least_connection lb_algorithm tests that require a specific delay between the requests [0] [0] https://opendev.org/openstack/octavia-tempest-plugin/src/branch/master/octavia_tempest_plugin/tests/scenario/v2/test_traffic_ops.py#L854 Change-Id: Idf0a9fb71178abea732748f92f01eed5a55a3228 --- octavia_tempest_plugin/tests/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octavia_tempest_plugin/tests/validators.py b/octavia_tempest_plugin/tests/validators.py index 5afe28aa..34e8148f 100644 --- a/octavia_tempest_plugin/tests/validators.py +++ b/octavia_tempest_plugin/tests/validators.py @@ -412,7 +412,7 @@ class ValidatorsMixin(test.BaseTestCase): return except Exception: LOG.warning('Server is not passing initial traffic. Waiting.') - time.sleep(1) + time.sleep(request_interval) LOG.debug('Loadbalancer wait for load balancer response totals: %s', response_counts)