Merge "Make APF packet count assertion more robust" into main

This commit is contained in:
Treehugger Robot 2025-07-29 06:00:58 -07:00 • committed by Android (Google) Code Review
commit fc432f5dec

View file

@ -140,6 +140,10 @@ class ApfTestBase(multi_devices_test_base.MultiDevicesTestBase):
counter_name,
)
matched_pkt_count_before_test = apf_utils.get_matched_packet_counts(
self.serverDevice, self.server_iface_name, receive_packet
)
# send 3 packets to prevent flaky test result
for _ in range(3):
apf_utils.send_raw_packet_downstream(
@ -150,7 +154,7 @@ class ApfTestBase(multi_devices_test_base.MultiDevicesTestBase):
lambda: apf_utils.get_matched_packet_counts(
self.serverDevice, self.server_iface_name, receive_packet
)
== 1,
> matched_pkt_count_before_test,
# ensure the server device capturing the offload packet on the handler thread
retry_interval_sec=3,
)