Skip to content

Commit

Permalink
[macsec]: Add a sleep at the link flap retry (#12324)
Browse files Browse the repository at this point in the history
Approach
What is the motivation for this PR?
There is a flaky failure on the macsec_test_fault_handling. It's due to the lag of DUT exceeding MKA_TIMEOUT that triggers a rekey.

How did you do it?
To mitigate this, retry the test after a while with a few seconds of idle time.

How did you verify/test it?
Check Azp

co-authorized by: [email protected]
  • Loading branch information
Pterosaur authored Apr 17, 2024
1 parent e1a317c commit 99675f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/macsec/test_fault_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def test_link_flap(self, duthost, ctrl_links, wait_mka_establish):
except AssertionError as e:
if retry == 0:
raise e
# This test may fail due to the lag of DUT exceeding MKA_TIMEOUT that triggers a rekey.
# To mitigate this, retry the test after a while with a few seconds of idle time.
sleep(30)
dut_egress_sa_table_orig, dut_ingress_sa_table_orig = dut_egress_sa_table_new, dut_ingress_sa_table_new

# Flap > 6 seconds but < 90 seconds
Expand Down

0 comments on commit 99675f5

Please sign in to comment.