[nexus] improve robustness of test 5.2.1 (#12402)

Changes 'IsChild()' check to 'IsAttached()' for REED_1 in test 5.2.1.
REED_1 may quickly transition beyond the child state (e.g., to router)
after attaching, causing 'IsChild()' to occasionally fail depending
on the timing of the check. Using 'IsAttached()' ensures the node is
successfully connected to the network regardless of its specific role.
This commit is contained in:
Jonathan Hui
2026-02-09 16:34:43 -08:00
committed by GitHub
parent 4c5d8f6a60
commit 462425c0e8
+1 -1
View File
@@ -174,7 +174,7 @@ void Test5_2_1(void)
*/
reed1.Join(dut);
nexus.AdvanceTime(kAttachToChildTime);
VerifyOrQuit(reed1.Get<Mle::Mle>().IsChild());
VerifyOrQuit(reed1.Get<Mle::Mle>().IsAttached());
Log("---------------------------------------------------------------------------------------");
Log("Step 3: Router_1 (DUT)");