Fix upstream network suffers packet loss in tests

Upstream network isn't as stable in downstream test execution,
test quickly checks traffic over time periods for configured limits,
asserts that there is no traffic loss to verify rate limitation
correctly.

This oftens fails on upstream gates, therefore adding the retry
decorator up to 3 times to get stable measures for test, while not
failing check/gate patches.

Change-Id: I7ad1fd74df4460554beb6b0ea89abcf8153645cb
This commit is contained in:
Maor Blaustein 2024-07-30 22:57:47 +03:00
parent de5213c77e
commit e11fe76607

View File

@ -34,6 +34,7 @@ from tempest.lib.common.utils import test_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from whitebox_neutron_tempest_plugin.common import utils
from whitebox_neutron_tempest_plugin.tests.scenario import base as wb_base
@ -508,6 +509,7 @@ class BaseSecGroupLoggingTest(
self.check_log_ssh(
should_log=True, hypervisor_ssh=vm_a['hv_ssh_client'])
@utils.retry_on_assert_fail(max_retries=3)
def _test_only_accepted_traffic_logged(self):
"""This test verifies that only the log entries of allowed traffic
exist when only the "allow" event is supposed to be logged