From 309511c6b8a58560d67c6c065f84fc65b944be84 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 2 Jul 2025 17:36:27 -0700 Subject: [PATCH] [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. --- tests/unit/test_mdns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_mdns.cpp b/tests/unit/test_mdns.cpp index 0d1e5c204..4b8be85c6 100644 --- a/tests/unit/test_mdns.cpp +++ b/tests/unit/test_mdns.cpp @@ -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);