Send multiple packets for stability

The test was observed to be flaky when sending a single packet.
Sending three packets increases the likelihood of the test's
assertion passing reliably, addressing potential timing issues
or packet loss.

Flag: EXEMPT test only
Bug: 419427388
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV6Test --iteration 10
Change-Id: I42426d49a81871e6c8e275b1bd8cb0964290ce17
This commit is contained in:
Jimi Chen 2025-07-24 13:37:37 +00:00
commit ed5e3c185a

View file

@ -140,9 +140,11 @@ class ApfTestBase(multi_devices_test_base.MultiDevicesTestBase):
counter_name,
)
apf_utils.send_raw_packet_downstream(
self.serverDevice, self.server_iface_name, send_packet
)
# send 3 packets to prevent flaky test result
for _ in range(3):
apf_utils.send_raw_packet_downstream(
self.serverDevice, self.server_iface_name, send_packet
)
assert_utils.expect_with_retry(
lambda: apf_utils.get_matched_packet_counts(