Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase our "waiting for subscription to time out" timer slack. #27870

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Increase our "waiting for subscription to time out" timer slack.
100ms is not enough: we have tests losing the timeslice for that long, and then
we break out of our "waiting for timeout" loop before we process the firing of
the timeout timer.

Fixes #27829
bzbarsky-apple committed Jul 10, 2023
commit 30fb1b6b55ca8a99a718211a1411480e94de5899
7 changes: 4 additions & 3 deletions src/controller/tests/data_model/TestRead.cpp
Original file line number Diff line number Diff line change
@@ -4645,14 +4645,15 @@ void TestReadInteraction::TestReadHandler_KeepSubscriptionTest(nlTestSuite * apS

System::Clock::Timeout TestReadInteraction::ComputeSubscriptionTimeout(System::Clock::Seconds16 aMaxInterval)
{
// Add 100ms of slack to our max interval to make sure we hit the
// subscription liveness timer.
// Add 1000ms of slack to our max interval to make sure we hit the
// subscription liveness timer. 100ms was tried in the past and is not
// sufficient: our process can easily lose the timeslice for 100ms.
const auto & ourMrpConfig = GetDefaultMRPConfig();
auto publisherTransmissionTimeout =
GetRetransmissionTimeout(ourMrpConfig.mActiveRetransTimeout, ourMrpConfig.mIdleRetransTimeout,
System::SystemClock().GetMonotonicTimestamp(), Transport::kMinActiveTime);

return publisherTransmissionTimeout + aMaxInterval + System::Clock::Milliseconds32(100);
return publisherTransmissionTimeout + aMaxInterval + System::Clock::Milliseconds32(1000);
}

// clang-format off