From 527945774eaaf09b97354c9c659a01e0ceaf6182 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 23 Jun 2023 19:51:22 -0400 Subject: [PATCH] Increase the timer slack TestRead allows to 100ms. (#27443) We're polling until a timer fires, but due to other threads losing the timeslice for a while we could decide it's not firing when it's just been blocked on the scheduler. To reduce the risk of that, give it a bit more time to fire. Fixes https://github.com/project-chip/connectedhomeip/issues/27438 --- src/controller/tests/data_model/TestRead.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 6e185c00dcf9ff..7be8008b7d7c9a 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -4645,14 +4645,14 @@ void TestReadInteraction::TestReadHandler_KeepSubscriptionTest(nlTestSuite * apS System::Clock::Timeout TestReadInteraction::ComputeSubscriptionTimeout(System::Clock::Seconds16 aMaxInterval) { - // Add 50ms of slack to our max interval to make sure we hit the + // Add 100ms of slack to our max interval to make sure we hit the // subscription liveness timer. const auto & ourMrpConfig = GetDefaultMRPConfig(); auto publisherTransmissionTimeout = GetRetransmissionTimeout(ourMrpConfig.mActiveRetransTimeout, ourMrpConfig.mIdleRetransTimeout, System::SystemClock().GetMonotonicTimestamp(), Transport::kMinActiveTime); - return publisherTransmissionTimeout + aMaxInterval + System::Clock::Milliseconds32(50); + return publisherTransmissionTimeout + aMaxInterval + System::Clock::Milliseconds32(100); } // clang-format off