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.
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
[ReadHandler] Removal of test flags #28421
[ReadHandler] Removal of test flags #28421
Changes from 1 commit
d00fdce
c7fb1d1
1f56ddb
146cc01
5c605c3
e7fe784
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the mock clock, why is spinning still needed? What's the difference between advancing by 10ms, and advancing once in one go? What exactly of the implementation is causing you to have to do that? Is the IO you expected not occurring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's necessary here is the multiple DriveIO, I just realized it is indeed not essential to do the first loop. The second one however is only there in a sort of way to ensure enough async events are process and that they are processed in the right time.
In the "test subscribe urgent wildcard event", 3 driveIOs are needed: Timer expired, Engine Run, EventManagement (report gets received by the readclient).
For the other tests, it's also a mater of ensuring the multiple event for chunked report are handled before the timer expires so that the timer gets properly reschudeled at the right time.
I put the multiple Drive IOs on the first occurence and kept the loop on the second with some explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual approach is to have a
DriveIOUntilIdle()
. Is there a way to implement this with existing DriveIO ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a comment about this from the previous designer about using DriveIOUntil, whic explained why he had to rely on loops in the first place as DriveIOUntil would be suceptible to scheduling issues.
In the meantime, it relies on the SystemClock to timeout, which won't work due to usage of a mock clock.
I can confirm I had the same problems when I tried to use it.
We also have DrainAndServiceIO but there again the function description states:
And there again I can confirm that in our case it doesn't work as we do have back and forth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpbeliveau-silabs back-and-forth should be OK for DrainAndServiceIO as long as it completes..... What actually fails if you use DrainAndServiceIO?