Commit cdca558
committed
Fix incorrect route delete polling threshold in test_crm_route
Issue:
PR sonic-net#22132 introduced a polling check after route deletion with an incorrect threshold: `crm_stats_route_used - total_routes`. This subtracts `total_routes` added from the initial baseline `crm_stats_route_used`, but the test only deletes routes it previously added, so the counter should return to the baseline — not below it. The bug is masked when total_routes = 1 (most platforms) but fails on broadcom-dnx devices where total_routes = 64.
Fix:
Change the threshold to `crm_stats_route_used + CRM_COUNTER_TOLERANCE` so the polling correctly waits for the counter to return to approximately the initial baseline value, consistent with the final assertion.
Signed-off-by: setu <setu@arista.com>1 parent 7faa728 commit cdca558
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
| |||
0 commit comments