Repository navigation
Give the dosing tests ten seconds to wait on the data queue - #2558
Merged
Merged
Conversation
The one-second waits in LoopDataManagerDosingTests expired on CircleCI's simulator, so two tests asserted against a manager that was still working and the test host then crashed with an index out of range. A longer timeout costs nothing when the tests pass.
marionbarker
approved these changes
Oct 7, 2026
marionbarker
left a comment
Contributor
There was a problem hiding this comment.
The changes make sense if the problem is the timeout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On CircleCI (LoopKit/LoopWorkspace#520, build 1224) two tests in
LoopDataManagerDosingTestsfailed:Both start with
waitOnDataQueue(), which waited one second forgetLoopState. On the CI simulator that expired, the tests carried on while the manager was still working, the assertions saw a nil recommendation, and the Loop test host then died withFatal error: Index out of range. The same tests pass locally and passed on the Sept 29 CI run, so this is load-sensitive.This raises
waitOnDataQueue's default and the other one-second waits in that file to ten seconds. Longer timeouts cost nothing when the tests pass and remove the race that follows a timed-out wait. LoopTests passes locally with the change.