-
Notifications
You must be signed in to change notification settings - Fork 25
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
Mock device fetcher #1681
Draft
lawrence-forooghian
wants to merge
16
commits into
main
Choose a base branch
from
mock-device-fetcher
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Mock device fetcher #1681
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
lawrence-forooghian
force-pushed
the
mock-device-fetcher
branch
from
April 18, 2023 17:19
7b97b31
to
e89ea5b
Compare
lawrence-forooghian
force-pushed
the
mock-device-fetcher
branch
from
April 18, 2023 17:49
e89ea5b
to
e8a3a19
Compare
The current logic assumes that the deviceRegistrations.save calls will complete in the order that they are started (and hence, that when the final device in the list has been registered, all of the devices have been registered). This is not correct, and means that sometimes we end up trying to create a channel subscription for a device that has not been registered yet, causing the channelSubscriptions.save call to fail.
It doesn’t provide any functionality.
There aren’t any places where we use setupOptions in a way whose behaviour differs from that of commonAppSetup.
Wasn’t adding anything useful.
For call site readability.
It’s already covered in the clientOptions(…) method.
It’s already covered in the clientOptions(…) method. I’ve chosen to go with .verbose as this feels more useful for someone wanting to debug a misbehaving test.
The SDK doesn’t use this property any more.
This is just a refactor, but the intention is that it form part of #1601 (avoiding using global SDK state for controlling test behaviour) — we’ll now be able to inject a mock device fetcher instead of having to use the shared one.
nil is being passed in the tests, and then the Swift mock is seeing it as an empty string
… Realtime TODO describe better i.e. just use the bits of TestEnvironment that are actually relevant to the test
lawrence-forooghian
force-pushed
the
mock-device-fetcher
branch
from
April 18, 2023 18:39
e8a3a19
to
4eaf77b
Compare
TODO are there tests that rely on using the same fetcher in both cases? Confirmed (by adding logging) that DefaultLocalDeviceFetcher is not being used in the test suite now, except for in its own tests.
Not quite sure why we’ve started needing this now
lawrence-forooghian
force-pushed
the
mock-device-fetcher
branch
from
April 18, 2023 19:06
4eaf77b
to
9ae828f
Compare
9 tasks
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.
No description provided.