Skip to content

Commit

Permalink
Acl test is flaky in checking syslogs. Test failed even the log was t…
Browse files Browse the repository at this point in the history
…here. (#10271)

Add delay to make sure ACL is applied before checking syslog.
  • Loading branch information
ysmanman authored Oct 11, 2023
1 parent c76f358 commit 39228d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/acl/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 39228d1

Please sign in to comment.