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

fix(fcm): Increase batch send timeout to 15 seconds #1999

Merged
merged 2 commits into from Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/messaging/batch-request-internal.ts
Expand Up @@ -20,7 +20,7 @@ import {
import { FirebaseAppError, AppErrorCodes } from '../utils/error';

const PART_BOUNDARY = '__END_OF_PART__';
const TEN_SECONDS_IN_MILLIS = 10000;
const TEN_SECONDS_IN_MILLIS = 15000;

/**
* Represents a request that can be sent as part of an HTTP batch request.
Expand Down
2 changes: 1 addition & 1 deletion test/unit/messaging/batch-requests.spec.ts
Expand Up @@ -249,7 +249,7 @@ describe('BatchRequestClient', () => {
expect(args.url).to.equal(batchUrl);
expect(args.headers).to.have.property(
'Content-Type', 'multipart/mixed; boundary=__END_OF_PART__');
expect(args.timeout).to.equal(10000);
expect(args.timeout).to.equal(15000);
const parsedRequest = parseHttpRequest(args.data as Buffer);
expect(parsedRequest.multipart.length).to.equal(requests.length);

Expand Down