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
[3.x] Fix async OP behaviors on server (oauth packages) #13127
Merged
Merged
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
✅ Deploy Preview for v3-meteor-api-docs canceled.
|
✅ Deploy Preview for v3-migration-docs canceled.
|
nachocodoner
changed the title
[3.x] Fix async OP behaviors on server
[3.x] Fix async OP behaviors on server (oauth packages)
May 9, 2024
denihs
approved these changes
May 9, 2024
I saw this just as I submitted #13137 (this issue kept on bugging us in staging). Noticed you fixed the issue in the Google OAuth package. |
Closed
StorytellerCZ
approved these changes
May 11, 2024
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.
OSS-411
Issue
Context: https://forums.meteor.com/t/meteor-3-0-rc-0-is-out/61515/28
In some parts of the code,
findOne
is still being utilized sync on Meteor 3.x, resulting in errors asking for migration, such as:Error: findOne + is not available on the server. Please use findOneAsync() instead
.Fix
Review all occurrences of
findOne
and other operations needing asynchronous migration on Meteor 3.x packages. Additionally, I'll supply a few regression tests to ensure coverage of the affected flow, enabling us to detect any missing adaptions in the future through test failures.The regression test triggering properly the requirement of this migration as showed in the next example:
New test helpers
I've added two new test helpers:
mockBehaviours
: This acts as a mock to halt the run on an entire module. Useful for testing specific flows while ignoring unwanted side-effects.waitUntil
: Prevents flakiness by awaiting a test assert with a timeout. It continuously checks for the condition and exits early upon its occurrence. This approach is more effective in overcoming flakiness.