From c7c5a02eb27f9af85a5701f660088ca8ef119057 Mon Sep 17 00:00:00 2001 From: Maor Blaustein Date: Wed, 5 Mar 2025 17:53:42 +0200 Subject: [PATCH] Timeout before getting logs Elvira noticed more occurrences where logs aren't fully written and partially fetched, so this fix adds generic wait time before any log fetching. Removed existing timeout to avoid double timeout done. Change-Id: I54a304c22108f79fa425bdb1b057536e00c072d2 --- .../tests/scenario/test_security_group_logging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py index ee1569f..494cbbf 100644 --- a/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py +++ b/whitebox_neutron_tempest_plugin/tests/scenario/test_security_group_logging.py @@ -213,7 +213,8 @@ class BaseSecGroupLoggingTest( hypervisor_ssh.host, _track_value) else: # tracks B value, after test traffic sent to be logged - # (extracts logs from file right away, to avoid race conditions). + # (wait time for logging to be done fully). + time.sleep(5) cmd_outputs = hypervisor_ssh.exec_command( "sudo grep ovn_pinctrl0 {0}".format(self.SG_LOG_FILE), timeout=120).splitlines() @@ -674,7 +675,6 @@ class BaseSecGroupLoggingTest( ping_amount = 10 self.check_remote_connectivity( vm_a['ssh_client'], vm_b_internal_ip, ping_count=ping_amount) - time.sleep(5) self.retrieve_tracked_log(vm_a['hv_ssh_client']) if not same_compute: self.retrieve_tracked_log(vm_b['hv_ssh_client'])