Skip to content
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

Added syncpointspec.json tests to RTDB #6678

Merged
merged 8 commits into from
Oct 12, 2022
Merged

Conversation

maneesht
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 11, 2022

⚠️ No Changeset found

Latest commit: ff1698b

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 Oct 11, 2022

Size Report 1

Affected Products

  • @firebase/firestore-compat

    TypeBase (03d1fab)Merge (da18880)Diff
    browser20.5 kB20.5 kB-1 B (-0.0%)
    esm527.6 kB27.6 kB-1 B (-0.0%)
    main20.9 kB20.9 kB-1 B (-0.0%)
    module20.5 kB20.5 kB-1 B (-0.0%)
    react-native20.5 kB20.5 kB-1 B (-0.0%)
  • @firebase/storage

    TypeBase (03d1fab)Merge (da18880)Diff
    browser55.5 kB55.6 kB+94 B (+0.2%)
    esm561.8 kB61.9 kB+95 B (+0.2%)
    main58.4 kB58.5 kB+94 B (+0.2%)
    module55.5 kB55.6 kB+94 B (+0.2%)
  • bundle

    TypeBase (03d1fab)Merge (da18880)Diff
    storage (uploadBytesResumable)56.1 kB56.2 kB+98 B (+0.2%)
  • firebase

    TypeBase (03d1fab)Merge (da18880)Diff
    firebase-compat.js740 kB740 kB+157 B (+0.0%)
    firebase-firestore-compat.js314 kB314 kB-1 B (-0.0%)
    firebase-storage-compat.js38.8 kB39.0 kB+158 B (+0.4%)
    firebase-storage.js38.3 kB38.5 kB+158 B (+0.4%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/gGDH27y7M8.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 11, 2022

Size Analysis Report 1

Affected Products

  • @firebase/storage

    • _UploadTask

      Size

      TypeBase (03d1fab)Merge (da18880)Diff
      size29.5 kB29.6 kB+98 B (+0.3%)
      size-with-ext-deps46.5 kB46.6 kB+98 B (+0.2%)
    • uploadBytesResumable

      Size

      TypeBase (03d1fab)Merge (da18880)Diff
      size29.7 kB29.8 kB+98 B (+0.3%)
      size-with-ext-deps46.7 kB46.8 kB+98 B (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/aupgTH29xQ.html

}
}

function patchFakeAuthFunctions(app: FirebaseApp) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

See if this is needed

const registrations = {};

for (let i = 0; i < testSpec.steps.length; ++i) {
const spec = unsafeClone(testSpec.steps[i]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add a TODO to not clone this and create a separate object that deals with its own concerns

*/

import { SyncPointTestParser } from './helpers/syncpoint-util';
import syncPointSpecs from './helpers/syncPointSpec.json';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually, we should split this up and support multiple specs


matches(otherEventRegistration: EventRegistration) {
if (otherEventRegistration instanceof TestEventRegistration) {
// TODO(mtewas unknown as TestEventRegistration rit
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Delete

const eventFn =
actualEventData.eventRegistration.getEventRunner(actualEventData);
eventFn();
console.log(currentSpec);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Delete this

private syncTree_: SyncTree;
constructor() {
this.app = initializeApp(
{ databaseURL: 'http://tests.fblocal.com:9000' },
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like these run against an emulator. For the future, it'd be nice if we could point them at prod/staging as well.

Copy link
Contributor

@jmwski jmwski left a comment

Choose a reason for hiding this comment

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

LGTM after nits discussed in-person are addressed.

@maneesht maneesht merged commit ef5ece3 into master Oct 12, 2022
@maneesht maneesht deleted the mtewani/add-syncpoint-tests branch October 12, 2022 17:58
@firebase firebase locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants