Skip to content

Firestore: withRetry test helper added #7411

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

Merged
merged 2 commits into from
Jul 4, 2023
Merged

Firestore: withRetry test helper added #7411

merged 2 commits into from
Jul 4, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jul 4, 2023

Add a withRetry() helper function to the Firestore integration testing utility library. This function takes an async function as an argument, calls it, and awaits the Promise that it returns. If the Promise is rejected with RetryError then the async function is simply called again. If the Promise resolves successfully or is rejected with any other exception then the Promise returned from withRetry() is resolved/rejected in the same manner.

The test 'resuming a query should use bloom filter to avoid full requery' in query.test.ts is modified to use this new helper function. An upcoming change, #7412, will also use this new withRetry() helper function.

…a query should use bloom filter to avoid full requery'
@dconeybe dconeybe self-assigned this Jul 4, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2023

⚠️ No Changeset found

Latest commit: f010340

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 4, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 4, 2023

@dconeybe dconeybe marked this pull request as ready for review July 4, 2023 17:13
@dconeybe dconeybe requested review from a team as code owners July 4, 2023 17:13
@dconeybe dconeybe requested a review from milaGGL July 4, 2023 17:13
Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I like how the 'retry','passed' string values are removed.

@dconeybe dconeybe merged commit aea4a44 into master Jul 4, 2023
@dconeybe dconeybe deleted the RetryTestHelper branch July 4, 2023 18:45
@firebase firebase locked and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants