mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 15:47:46 +00:00
[mdns] make test_mdns more robust (#11668)
This commit updates the wait time in the `test_mdns` unit test to handle a rare timing failure. When a truncated message is sent, mDNS is expected to wait for a random delay of at least 400ms. The test previously waited exactly 400ms before checking for emitted messages, leading to rare failures if the random delay was precisely 400ms. This change reduces the test's wait time to 399ms, ensuring it correctly verifies that no message is emitted during the initial delay period and making the test more robust.
This commit is contained in:
@@ -4703,7 +4703,7 @@ void TestMultiPacket(void)
|
||||
|
||||
Log("Since message is marked as `truncated`, mDNS should wait at least 400 msec");
|
||||
|
||||
AdvanceTime(400);
|
||||
AdvanceTime(399);
|
||||
VerifyOrQuit(sDnsMessages.IsEmpty());
|
||||
|
||||
AdvanceTime(2000);
|
||||
|
||||
Reference in New Issue
Block a user