Skip to content

Bug: ACL tests fails in test_icmp_match_forwarded because counters don't always update within 10s #19219

@Javier-Tan

Description

@Javier-Tan

Is it platform specific

generic

Importance or Severity

Medium

Description of the bug

In acl/test_acl.py, coutners_sanity_check class level fixture checks that specific ACL counters that are tested on are greated (incremented) after the test is finished compared to before the test.

Currently there is a 10 second delay in the fixture to allow for counters to update ACL_COUNTERS_UPDATE_INTERVAL_SECS of 10 seconds. We notice that sometimes the counters don't increment within that timeframe and increasing the timeout (tested on 30s) helps here.

See below where 'after' traffic is 10s delay, and 'after2' traffic is after 30s delay.

03:16:49 test_acl.counters_sanity_check           L0869 INFO   | Counters for ACL rule "RULE_29" before traffic:
{'bytes_count': 0, 'packets_count': 0} - before
03:16:49 test_acl.counters_sanity_check           L0893 INFO   | Counters for ACL rule "RULE_29" after traffic:
{'bytes_count': 0, 'packets_count': 0} - 10s delay
03:16:49 test_acl.counters_sanity_check           L0896 INFO   | Counters for ACL rule "RULE_29" after2 traffic:
{'bytes_count': 48, 'packets_count': 1} - 30s delay

Specifically can see failures on test_icmp_match_forwarded, as it is the last test in the class and the fixture runs in the teardown.

We notice this in uT2 particularly, however we have sighted this in acl PR checker test as well, so not sure the scope of the affect of this delay being too short

Steps to Reproduce

Run acl/test_acl.py and you may see some failures in any test_icmp_match_forwarded tests.

Actual Behavior and Expected Behavior

We should not error out because the counters do eventually increase.

Relevant log output

N/A

Output of show version

N/A

Attach files (if any)

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions