|
28 | 28 | from tests.common.helpers.dut_ports import get_vlan_interface_list, get_vlan_interface_info |
29 | 29 |
|
30 | 30 |
|
| 31 | +# packet count for traffic test |
| 32 | +COUNT = 10 |
| 33 | + |
31 | 34 | pytestmark = [ |
32 | 35 | pytest.mark.topology('t0', 'm0', 'mx'), |
33 | 36 | pytest.mark.device_type('vs') |
@@ -122,7 +125,7 @@ def generate_and_verify_traffic(duthost, ptfadapter, tbinfo, ip_dst, expected_po |
122 | 125 | upstream_name = UPSTREAM_NEIGHBOR_MAP[topo_type] |
123 | 126 | ptf_upstream_intf = random.choice(get_neighbor_ptf_port_list(duthost, upstream_name, tbinfo)) |
124 | 127 | ptfadapter.dataplane.flush() |
125 | | - testutils.send(ptfadapter, ptf_upstream_intf, pkt, count=10) |
| 128 | + testutils.send(ptfadapter, ptf_upstream_intf, pkt, count=COUNT) |
126 | 129 | testutils.verify_packet_any_port(ptfadapter, exp_pkt, ports=expected_ports) |
127 | 130 |
|
128 | 131 |
|
@@ -256,7 +259,7 @@ def run_static_route_test(duthost, unselected_duthost, ptfadapter, ptfhost, tbin |
256 | 259 | duthost.shell("dualtor_neighbor_check.py") |
257 | 260 |
|
258 | 261 | with RouteFlowCounterTestContext(is_route_flow_counter_supported, |
259 | | - duthost, [prefix], {prefix: {'packets': '1'}}): |
| 262 | + duthost, [prefix], {prefix: {'packets': COUNT}}): |
260 | 263 | generate_and_verify_traffic(duthost, ptfadapter, tbinfo, ip_dst, nexthop_devs, ipv6=ipv6) |
261 | 264 |
|
262 | 265 | # Check the route is advertised to the neighbors |
@@ -285,7 +288,7 @@ def run_static_route_test(duthost, unselected_duthost, ptfadapter, ptfhost, tbin |
285 | 288 | for nexthop_addr in nexthop_addrs: |
286 | 289 | duthost.shell("timeout 1 ping -c 1 -w 1 {}".format(nexthop_addr), module_ignore_errors=True) |
287 | 290 | with RouteFlowCounterTestContext(is_route_flow_counter_supported, duthost, |
288 | | - [prefix], {prefix: {'packets': '1'}}): |
| 291 | + [prefix], {prefix: {'packets': COUNT}}): |
289 | 292 | generate_and_verify_traffic(duthost, ptfadapter, tbinfo, ip_dst, nexthop_devs, ipv6=ipv6) |
290 | 293 | check_route_redistribution(duthost, prefix, ipv6) |
291 | 294 |
|
|
0 commit comments