Skip to content

Commit 3ab8d6a

Browse files
committed
fix(e2e): extend Codex on-demand install timeout
1 parent f2af052 commit 3ab8d6a

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

scripts/e2e/codex-on-demand-docker.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ HOST_BUILD="${OPENCLAW_CODEX_ON_DEMAND_HOST_BUILD:-1}"
1313
PACKAGE_TGZ="${OPENCLAW_CURRENT_PACKAGE_TGZ:-}"
1414
run_log=""
1515

16+
# This lane installs the package and then exercises a managed npm install of Codex.
17+
# Keep the package install budget above the shared default so slow npm hosts reach
18+
# the Codex assertions instead of failing as a silent package-install timeout.
19+
export OPENCLAW_E2E_NPM_INSTALL_TIMEOUT="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-1200s}"
20+
1621
cleanup() {
1722
if [ -n "${PACKAGE_TGZ:-}" ]; then
1823
docker_e2e_cleanup_package_tgz "$PACKAGE_TGZ"

test/scripts/docker-build-helper.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,12 @@ const QR_IMPORT_DOCKER_E2E_PATH = "scripts/e2e/qr-import-docker.sh";
5656
const MULTI_NODE_UPDATE_DOCKER_E2E_PATH = "scripts/e2e/multi-node-update-docker.sh";
5757
const BUNDLED_PLUGIN_INSTALL_UNINSTALL_E2E_PATH =
5858
"scripts/e2e/bundled-plugin-install-uninstall-docker.sh";
59-
const AGENT_BUNDLE_MCP_TOOLS_DOCKER_E2E_PATH =
60-
"scripts/e2e/agent-bundle-mcp-tools-docker.sh";
59+
const AGENT_BUNDLE_MCP_TOOLS_DOCKER_E2E_PATH = "scripts/e2e/agent-bundle-mcp-tools-docker.sh";
6160
const COMMITMENTS_SAFETY_DOCKER_E2E_PATH = "scripts/e2e/commitments-safety-docker.sh";
6261
const CRESTODIAN_FIRST_RUN_DOCKER_E2E_PATH = "scripts/e2e/crestodian-first-run-docker.sh";
6362
const CRESTODIAN_PLANNER_DOCKER_E2E_PATH = "scripts/e2e/crestodian-planner-docker.sh";
6463
const CRESTODIAN_RESCUE_DOCKER_E2E_PATH = "scripts/e2e/crestodian-rescue-docker.sh";
65-
const SESSION_RUNTIME_CONTEXT_DOCKER_E2E_PATH =
66-
"scripts/e2e/session-runtime-context-docker.sh";
64+
const SESSION_RUNTIME_CONTEXT_DOCKER_E2E_PATH = "scripts/e2e/session-runtime-context-docker.sh";
6765
const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SWEEP_PATH =
6866
"scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh";
6967
const BUNDLED_PLUGIN_INSTALL_UNINSTALL_PROBE_PATH =
@@ -2804,6 +2802,14 @@ grep -Fxq preserved "$TMPDIR/caller-fd"
28042802
}
28052803
});
28062804

2805+
it("gives Codex on-demand package installs enough time to reach Codex assertions", () => {
2806+
const runner = readFileSync(CODEX_ON_DEMAND_DOCKER_E2E_PATH, "utf8");
2807+
2808+
expect(runner).toContain(
2809+
'export OPENCLAW_E2E_NPM_INSTALL_TIMEOUT="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-1200s}"',
2810+
);
2811+
});
2812+
28072813
it("cleans package-backed onboarding and plugin Docker artifacts on every exit path", () => {
28082814
for (const path of [
28092815
CODEX_ON_DEMAND_DOCKER_E2E_PATH,
@@ -4188,7 +4194,7 @@ output="$(cat "$sampler_log")"
41884194
const client = readFileSync(OPENAI_WEB_SEARCH_MINIMAL_CLIENT_PATH, "utf8");
41894195

41904196
expect(runner).toContain(
4191-
"PORT=\"$(docker_e2e_read_tcp_port_env OPENCLAW_OPENAI_WEB_SEARCH_MINIMAL_PORT 18789)\"",
4197+
'PORT="$(docker_e2e_read_tcp_port_env OPENCLAW_OPENAI_WEB_SEARCH_MINIMAL_PORT 18789)"',
41924198
);
41934199
expect(runner).toContain('MOCK_PORT="80"');
41944200
expect(runner).not.toContain("OPENCLAW_OPENAI_WEB_SEARCH_MINIMAL_MOCK_PORT");

0 commit comments

Comments
 (0)