mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
test: stabilize exec resolver timeout fixture
This commit is contained in:
@@ -195,14 +195,14 @@ describe("secret ref resolver", () => {
|
||||
|
||||
itPosix("uses timeoutMs as the default no-output timeout for exec providers", async () => {
|
||||
const root = await createCaseDir("exec-delay");
|
||||
const scriptPath = path.join(root, "resolver-delay.mjs");
|
||||
const scriptPath = path.join(root, "resolver-delay.sh");
|
||||
// Keep the fixture cheap to start so this stays deterministic under a busy test run.
|
||||
await writeSecureFile(
|
||||
scriptPath,
|
||||
[
|
||||
"#!/usr/bin/env node",
|
||||
"setTimeout(() => {",
|
||||
" process.stdout.write(JSON.stringify({ protocolVersion: 1, values: { delayed: 'ok' } }));",
|
||||
"}, 30);",
|
||||
"#!/bin/sh",
|
||||
"sleep 0.03",
|
||||
'printf \'{"protocolVersion":1,"values":{"delayed":"ok"}}\'',
|
||||
].join("\n"),
|
||||
0o700,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user