From 75db779969b3f00afb8480ad5514978d484cbf30 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Tue, 17 Feb 2026 14:59:01 -0600 Subject: [PATCH] [nexus] fix flake in test 5.8.3 Key Increment of 1 With Roll-over (#12473) Step 6 of test 5.8.3 requires the DUT to send an MLE Advertisement reflecting the updated Key Sequence Counter. The previous 10-second simulation time in this step was occasionally insufficient, as the default MLE advertisement interval can be up to 32 seconds. This commit increases the simulation time in Step 6 to 35 seconds (kMaxAdvertisementTime) to ensure that at least one periodic MLE Advertisement is captured in the pcap for verification. --- tests/nexus/test_5_8_3.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/nexus/test_5_8_3.cpp b/tests/nexus/test_5_8_3.cpp index 43ad0d1ea..c8aedf020 100644 --- a/tests/nexus/test_5_8_3.cpp +++ b/tests/nexus/test_5_8_3.cpp @@ -50,6 +50,12 @@ static constexpr uint32_t kAttachToRouterTime = 200 * 1000; */ static constexpr uint32_t kStabilizationTime = 10 * 1000; +/** + * Max time to wait for an MLE Advertisement, in milliseconds. + * The max MLE advertisement interval is 32 seconds. + */ +static constexpr uint32_t kMaxAdvertisementTime = 35 * 1000; + /** * Initial Key Sequence Counter value. */ @@ -165,7 +171,7 @@ void Test5_8_3(void) * - Key ID Mode = 0x02 (2) * - Key Index = 0x01 (1) */ - nexus.AdvanceTime(kStabilizationTime); + nexus.AdvanceTime(kMaxAdvertisementTime); VerifyOrQuit(router1.Get().GetCurrentKeySequence() == kInitialKeySequence + 1); nexus.SaveTestInfo("test_5_8_3.json");