-
Notifications
You must be signed in to change notification settings - Fork 910
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
Emulator Idempotency: Database #8769
Conversation
🦋 Changeset detectedLatest commit: 7bfbec9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Vertex AI Mock Responses Check
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (172,033 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
@@ -138,6 +141,43 @@ describe('Database@exp Tests', () => { | |||
unsubscribe(); | |||
}); | |||
|
|||
it('can connected to emulator', async () => { |
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.
Nit: some typos. "can connected to" here and in 160, "chnage" in 151
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.
Fixed!
Discussion
Update the
connectDatabaseEmulator
function to support its invocation more than once. If the Database instance is already in use, andconnectDatabaseEmulator
is invoked with the same configuration, then the invocation will now succeed instead of assert.This unlocks support for web frameworks which may render the page numerous times with the same instances of RTDB. Before this PR customers needed to add extra code to guard against calling
connectDatabaseEmulator
in their SSR logic. Now we do that guarding logic on their behalf which should simplify our customer's apps.Fixes #6824.
Testing
CI, new tests added to integration tests.
API Changes
N/A