Skip to content

Commit

Permalink
[test_snmp_queue_counters.py]: Added support for single buffer queue …
Browse files Browse the repository at this point in the history
…and fix range related issues (#16139)

Regression test were failing becuase it was not bale to calculate correct range

Description of PR
Support for single Queue was not there such as 'Ethernet128|1' modified core to support both
'Ethernet128|1' and 'Ethernet128|0-2'

Summary:
Fixes # (issue)

co-authorized by: [email protected]
  • Loading branch information
harjotsinghpawra authored and mssonicbld committed Dec 20, 2024
1 parent 3c088bc commit f4c21a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/snmp/test_snmp_queue_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def test_snmp_queue_counters(duthosts,
# check for other duts
else:
range_str = str(buffer_queue_to_del.split('|')[-1])
buffer_queues_removed = int(range_str.split('-')[1]) - int(range_str.split('-')[0]) + 1
if '-' in range_str:
buffer_queues_removed = int(range_str.split('-')[1]) - int(range_str.split('-')[0]) + 1
else:
buffer_queues_removed = 1
unicast_expected_diff = buffer_queues_removed * UNICAST_CTRS
multicast_expected_diff = unicast_expected_diff + (buffer_queues_removed
* MULTICAST_CTRS)
Expand Down

0 comments on commit f4c21a2

Please sign in to comment.