@@ -10,6 +10,7 @@ import { tmpdir } from "node:os";
1010import path from "node:path" ;
1111import { pathToFileURL } from "node:url" ;
1212import { gunzipSync } from "node:zlib" ;
13+ import { resolveTimerTimeoutMs } from "@openclaw/normalization-core/number-coercion" ;
1314import { stripLeadingPackageManagerSeparator } from "../../../../scripts/lib/arg-utils.mjs" ;
1415import { resolveWindowsTaskkillPath } from "../../../../scripts/lib/windows-taskkill.mjs" ;
1516
@@ -1275,12 +1276,13 @@ async function waitForChild(
12751276 timeoutMs = QA_SUITE_TIMEOUT_MS ,
12761277 killGraceMs = QA_SUITE_KILL_GRACE_MS ,
12771278) : Promise < number > {
1279+ const resolvedTimeoutMs = resolveTimerTimeoutMs ( timeoutMs , QA_SUITE_TIMEOUT_MS ) ;
12781280 const childExit = new Promise < number > ( ( resolve ) => {
12791281 child . once ( "close" , ( code ) => resolve ( code ?? 1 ) ) ;
12801282 } ) ;
12811283 let timeoutHandle : NodeJS . Timeout | undefined ;
12821284 const timeout = new Promise < "timeout" > ( ( resolve ) => {
1283- timeoutHandle = setTimeout ( ( ) => resolve ( "timeout" ) , timeoutMs ) ;
1285+ timeoutHandle = setTimeout ( ( ) => resolve ( "timeout" ) , resolvedTimeoutMs ) ;
12841286 timeoutHandle . unref ( ) ;
12851287 } ) ;
12861288 const result = await Promise . race ( [ childExit , timeout ] ) . finally ( ( ) => {
@@ -1298,7 +1300,7 @@ async function waitForChild(
12981300 terminateChildTree ( child , "SIGKILL" , cleanupPids ) ;
12991301 await waitForProcessTreeExit ( child , 1000 , cleanupPids ) ;
13001302 }
1301- throw new Error ( `openclaw qa suite timed out after ${ timeoutMs } ms` ) ;
1303+ throw new Error ( `openclaw qa suite timed out after ${ resolvedTimeoutMs } ms` ) ;
13021304}
13031305
13041306function collectChildProcessTreePids ( child : ChildProcess ) : number [ ] {
0 commit comments