Skip to content

Commit 29118a0

Browse files
committed
test(qa): tolerate slow gateway rpc startup
1 parent ab684f5 commit 29118a0

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

extensions/qa-lab/src/gateway-child.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import type { QaTransportAdapter } from "./qa-transport.js";
4545

4646
export type { QaCliBackendAuthMode } from "./providers/env.js";
4747
const QA_GATEWAY_CHILD_STARTUP_MAX_ATTEMPTS = 5;
48+
const QA_GATEWAY_CHILD_RPC_STARTUP_TIMEOUT_MS = 30_000;
4849
const QA_GATEWAY_CHILD_RPC_RETRY_HEALTH_TIMEOUT_MS = 60_000;
4950
const QA_GATEWAY_CHILD_RESTART_BOUNDARY_TIMEOUT_MS = 90_000;
5051
const QA_GATEWAY_CHILD_BLOCKED_SECRET_ENV_VARS = Object.freeze([
@@ -793,7 +794,13 @@ export async function startQaGatewayChild(params: {
793794
let lastRpcStartupError: unknown = null;
794795
for (let rpcAttempt = 1; rpcAttempt <= 4; rpcAttempt += 1) {
795796
try {
796-
await attemptRpcClient.request("config.get", {}, { timeoutMs: 10_000 });
797+
await attemptRpcClient.request(
798+
"config.get",
799+
{},
800+
{
801+
timeoutMs: QA_GATEWAY_CHILD_RPC_STARTUP_TIMEOUT_MS,
802+
},
803+
);
797804
rpcReady = true;
798805
break;
799806
} catch (error) {
@@ -887,7 +894,13 @@ export async function startQaGatewayChild(params: {
887894
let lastRpcStartupError: unknown = null;
888895
for (let rpcAttempt = 1; rpcAttempt <= 4; rpcAttempt += 1) {
889896
try {
890-
await nextRpcClient.request("config.get", {}, { timeoutMs: 10_000 });
897+
await nextRpcClient.request(
898+
"config.get",
899+
{},
900+
{
901+
timeoutMs: QA_GATEWAY_CHILD_RPC_STARTUP_TIMEOUT_MS,
902+
},
903+
);
891904
rpcReady = true;
892905
break;
893906
} catch (error) {

0 commit comments

Comments
 (0)