-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add a unit test of System::Layer timer order #12895
Merged
andy31415
merged 1 commit into
project-chip:master
from
kpschoedel:system-layer-timer-tests
Dec 10, 2021
Merged
Add a unit test of System::Layer timer order #12895
andy31415
merged 1 commit into
project-chip:master
from
kpschoedel:system-layer-timer-tests
Dec 10, 2021
Conversation
This file contains 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
#### Problem Nothing explicitly tests that `System::Layer` timers fire in chronological order. Since we can now have a mock system clock, this is testable. #### Change overview - Add a unit test verifying that timer callbacks run in order. - Add unit test assertions for timer statistics. - Revise implementation selection in TestSystemTimer to use the `Layer` class rather than only '#if', since not every configuration with sockets/LwIP necessarily needs to use the provided `Layer` implementations. - Provide a common MockClock implementation. #### Testing Res ipsa loquitur.
pullapprove
bot
requested review from
andy31415,
anush-apple,
austinh0,
balducci-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
erjiaqing,
franck-apple,
gjc13,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
LuDuda,
lzgrablic02,
mlepage-google,
mrjerryjohns,
msandstedt and
pan-apple
December 10, 2021 16:27
pullapprove
bot
requested review from
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tecimovic,
turon,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yunhanw-google
December 10, 2021 16:27
andy31415
approved these changes
Dec 10, 2021
fast track: this adds unit tests |
yunhanw-google
approved these changes
Dec 10, 2021
woody-apple
approved these changes
Dec 10, 2021
kpschoedel
added a commit
to kpschoedel/connectedhomeip
that referenced
this pull request
Dec 20, 2021
#### Problem PR project-chip#12895 included consolidating several unit tests' nearly-identical mock `System::Clock` implementations into one, but missed a couple. #### Change overview Use `System::Clock::Internal::MockClock` in `TestDnssdCache` and `TestPeerConnections`. #### Testing Yes indeed.
kpschoedel
added a commit
that referenced
this pull request
Dec 21, 2021
#### Problem PR #12895 included consolidating several unit tests' nearly-identical mock `System::Clock` implementations into one, but missed a couple. #### Change overview Use `System::Clock::Internal::MockClock` in `TestDnssdCache` and `TestPeerConnections`.
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.
Problem
Nothing explicitly tests that
System::Layer
timers fire inchronological order. Since we can now have a mock system clock,
this is testable.
Change overview
TestSystemTimer
to use theLayer
class rather than only '#if', since not every configurationwith sockets/LwIP necessarily needs to use the provided
Layer
implementations.
MockClock
implementation, unifying theversions in other unit tests.
Testing
Res ipsa loquitur.