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 a648537..5869c48 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 @@ -217,6 +217,8 @@ class BaseSecGroupLoggingTest( def _get_logs_and_counts(self, hypervisor_ssh, start_track): # create dictionary to track values of a hypervisor if it doesn't exist self._hypervisors_counts.setdefault(hypervisor_ssh.host, dict()) + # wait for logging to be done fully, or away from other log events + time.sleep(5) if start_track: # tracks A value, before test traffic sent to be logged _track_value = int(hypervisor_ssh.exec_command( @@ -227,8 +229,6 @@ class BaseSecGroupLoggingTest( hypervisor_ssh.host, _track_value) else: # tracks B value, after test traffic sent to be logged - # (wait time for logging to be done fully). - time.sleep(5) cmd_outputs = hypervisor_ssh.exec_command( "sudo grep {} {}".format(self.ENTRY_PTN, self.SG_LOG_FILE), timeout=120).splitlines()