From c4dce3d6e7569e2109f77fe3b1489fdbf0902bb4 Mon Sep 17 00:00:00 2001 From: "Ryan P. Brewster" Date: Tue, 27 Nov 2018 11:37:56 -0800 Subject: [PATCH] Put another limit on gRPC backoff --- packages/testing/src/api/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/testing/src/api/index.ts b/packages/testing/src/api/index.ts index 54475a9f577..fb306cd3bc6 100644 --- a/packages/testing/src/api/index.ts +++ b/packages/testing/src/api/index.ts @@ -200,7 +200,13 @@ export function loadFirestoreRules( let client = new EMULATOR.FirestoreEmulator( FIRESTORE_ADDRESS, - grpc.credentials.createInsecure() + grpc.credentials.createInsecure(), + { + // Cap how much backoff gRPC will perform. This is testing code, so + // efficiency is less important than responsiveness. + 'grpc.initial_reconnect_backoff_ms': 100, + 'grpc.max_reconnect_backoff_ms': 100 + } ); return new Promise((resolve, reject) => { client.setSecurityRules(