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

clear failAfter timeout after request resolves #3330

Merged
merged 4 commits into from
Jul 7, 2020

Conversation

Feiyang1
Copy link
Member

@Feiyang1 Feiyang1 commented Jul 1, 2020

Fixes #3289

@changeset-bot
Copy link

changeset-bot bot commented Jul 1, 2020

🦋 Changeset is good to go

Latest commit: d439ded

We got this.

This PR includes changesets to release 8 packages
Name Type
@firebase/functions Patch
firebase Patch
@firebase/testing Patch
firebase-browserify-test Patch
firebase-package-typings-test Patch
firebase-messaging-selenium-test Patch
firebase-typescript-test Patch
firebase-webpack-test Patch

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 1, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (a754645) Head (ff4a3ef) Diff
    browser 248 kB 247 kB -1.58 kB (-0.6%)
    esm2017 194 kB 193 kB -256 B (-0.1%)
    main 493 kB 494 kB +569 B (+0.1%)
    module 246 kB 244 kB -1.61 kB (-0.7%)
    react-native 194 kB 194 kB -286 B (-0.1%)
  • @firebase/firestore/exp

    Type Base (a754645) Head (ff4a3ef) Diff
    main 395 kB 398 kB +2.48 kB (+0.6%)
  • @firebase/firestore/lite

    Type Base (a754645) Head (ff4a3ef) Diff
    main 141 kB 124 kB -16.7 kB (-11.8%)
  • @firebase/firestore/memory

    Type Base (a754645) Head (ff4a3ef) Diff
    browser 186 kB 184 kB -1.59 kB (-0.9%)
    esm2017 145 kB 145 kB -250 B (-0.2%)
    main 363 kB 363 kB +553 B (+0.2%)
    module 184 kB 182 kB -1.57 kB (-0.9%)
    react-native 145 kB 145 kB -262 B (-0.2%)
  • @firebase/functions

    Type Base (a754645) Head (ff4a3ef) Diff
    browser 9.18 kB 9.64 kB +463 B (+5.0%)
    esm2017 7.01 kB 7.30 kB +285 B (+4.1%)
    main 9.21 kB 9.67 kB +463 B (+5.0%)
    module 9.00 kB 9.45 kB +451 B (+5.0%)
  • @firebase/messaging

    Type Base (a754645) Head (ff4a3ef) Diff
    esm2017 23.2 kB 23.2 kB +35 B (+0.2%)
    main 31.4 kB 31.4 kB +35 B (+0.1%)
    module 30.9 kB 30.9 kB +35 B (+0.1%)
  • firebase

    Type Base (a754645) Head (ff4a3ef) Diff
    firebase-firestore.js 286 kB 285 kB -1.83 kB (-0.6%)
    firebase-firestore.memory.js 226 kB 224 kB -1.82 kB (-0.8%)
    firebase-functions.js 9.60 kB 9.84 kB +242 B (+2.5%)
    firebase-messaging.js 39.1 kB 39.2 kB +43 B (+0.1%)
    firebase.js 820 kB 818 kB -1.54 kB (-0.2%)

Test Logs

Copy link
Contributor

@hsubox76 hsubox76 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, if you want a test, something like this (in callable.test.ts) seems to work maybe?

 it('cancel timeout', async () => {
    const functions = createTestService(app, region);
    const globalObj = typeof window !== 'undefined' ? window : global;
    const clearTimeoutSpy = sinon.spy(globalObj, 'clearTimeout');
    const func = functions.httpsCallable('nullTest');
    await func(null);
    expect(clearTimeoutSpy.called).to.be.true;
    clearTimeoutSpy.restore();
  });

@Feiyang1
Copy link
Member Author

Feiyang1 commented Jul 7, 2020

Awesome! added the test.

@Feiyang1 Feiyang1 merged commit bb74083 into master Jul 7, 2020
@Feiyang1 Feiyang1 deleted the fei-functions-timeout-fix branch July 7, 2020 19:35
@github-actions github-actions bot mentioned this pull request Jul 7, 2020
@firebase firebase locked and limited conversation to collaborators Aug 7, 2020
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.

Callable Function throw Deadline Exceeded Error even on successful response
3 participants