From 39228d1a6b5411428a88394c78719e4b896fd8c2 Mon Sep 17 00:00:00 2001 From: Song Yuan <64041228+ysmanman@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:43:41 -0700 Subject: [PATCH] Acl test is flaky in checking syslogs. Test failed even the log was there. (#10271) Add delay to make sure ACL is applied before checking syslog. --- tests/acl/test_acl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/acl/test_acl.py b/tests/acl/test_acl.py index bfb36e9703..3d4b5928b2 100644 --- a/tests/acl/test_acl.py +++ b/tests/acl/test_acl.py @@ -532,6 +532,8 @@ def create_or_remove_acl_table(duthost, acl_table_config, setup, op, topo): logger.info("Removing ACL table \"{}\" in namespace {} on device {}" .format(acl_table_config["table_name"], namespace, duthost)) sonic_host_or_asic_inst.command("config acl remove table {}".format(acl_table_config["table_name"])) + # Give the dut some time for the ACL to be applied and LOG message generated + time.sleep(30) @pytest.fixture(scope="module") @@ -668,6 +670,8 @@ def acl_rules(self, duthosts, localhost, setup, acl_table, populate_vlan_arp_ent loganalyzer.ignore_regex = [r".*"] with loganalyzer: self.setup_rules(duthost, acl_table, ip_version) + # Give the dut some time for the ACL rules to be applied and LOG message generated + time.sleep(30) self.post_setup_hook(duthost, localhost, populate_vlan_arp_entries, tbinfo, conn_graph_facts)