Skip to content

Commit 15ec4ce

Browse files
Put another limit on gRPC backoff (#1403)
1 parent 024b074 commit 15ec4ce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/testing/src/api/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,13 @@ export function loadFirestoreRules(
200200

201201
let client = new EMULATOR.FirestoreEmulator(
202202
FIRESTORE_ADDRESS,
203-
grpc.credentials.createInsecure()
203+
grpc.credentials.createInsecure(),
204+
{
205+
// Cap how much backoff gRPC will perform. This is testing code, so
206+
// efficiency is less important than responsiveness.
207+
'grpc.initial_reconnect_backoff_ms': 100,
208+
'grpc.max_reconnect_backoff_ms': 100
209+
}
204210
);
205211
return new Promise((resolve, reject) => {
206212
client.setSecurityRules(

0 commit comments

Comments
 (0)