-
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 write roundtrip test #8169
Merged
bzbarsky-apple
merged 2 commits into
project-chip:master
from
bzbarsky-apple:add-write-roundtrip-test
Jul 9, 2021
Merged
Add write roundtrip test #8169
bzbarsky-apple
merged 2 commits into
project-chip:master
from
bzbarsky-apple:add-write-roundtrip-test
Jul 9, 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
This allows us to test more details of the messages being sent.
pullapprove
bot
requested review from
chrisdecenzo,
jelderton,
jmartinez-silabs,
LuDuda,
mspang,
saurabhst,
selissia and
woody-apple
July 7, 2021 17:37
andy31415
approved these changes
Jul 7, 2021
yunhanw-google
approved these changes
Jul 7, 2021
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.
thanks
jmartinez-silabs
approved these changes
Jul 8, 2021
Various fixups needed for that: 1) Make InteractionModelEngine::Shutdown actually remove the object as an unsolicited message handler. 2) Initialize WriteHandler's state properly so it's not random whether we think we have available WriteHandlers. 3) Fix TestWriteInteraction::AddAttributeDataElement to use the right tag (2, not 1) for its data. 4) Stop trying to run AppTests in QEMU, because of linking/compilation issues in that setup.
bzbarsky-apple
force-pushed
the
add-write-roundtrip-test
branch
from
July 9, 2021 04:03
dc84b2e
to
a9de05b
Compare
libAppTests depends on MessagingTestHelpers, which depends onconnectedhomeip/scripts/tests/esp32_qemu_tests.sh Lines 64 to 74 in a9de05b
This comment was generated by todo based on a
|
Size increase report for "esp32-example-build" from 046f46a
Full report output
|
@msandstedt @saurabhst Please take a look? |
saurabhst
approved these changes
Jul 9, 2021
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
* Refactor TestWriteInteraction to use a MessagingContext. This allows us to test more details of the messages being sent. * Add a roundtrip test to TestWriteInteraction. Various fixups needed for that: 1) Make InteractionModelEngine::Shutdown actually remove the object as an unsolicited message handler. 2) Initialize WriteHandler's state properly so it's not random whether we think we have available WriteHandlers. 3) Fix TestWriteInteraction::AddAttributeDataElement to use the right tag (2, not 1) for its data. 4) Stop trying to run AppTests in QEMU, because of linking/compilation issues in that setup.
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
We don't have a unit test for a round-trip write: instantiate a WriteClient, do a write on it, have that create a WriteHandler on the destination, respond, etc.
Change overview
Adds such a test.
Testing
Ran the unit tests. This uncovered a few bugs in our implementation that are fixed as part of the PR.
Reviewer note
Reviewing the two changesets in this PR separately might be simpler than reviewing the overall diff.