File tree Expand file tree Collapse file tree
src/test/java/io/github/easy4j/codex/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,12 +182,14 @@ void shouldUseDedicatedProbeTimeoutWithoutChangingNormalTimeout() {
182182
183183 @ Test
184184 void shouldTimeoutOnHangingProcess () {
185- // Use a short timeout and a command that sleeps for a long time.
186- CodexClientConfig config = configFor ("/bin/sh" );
185+ // Keep the blocking loop in the shell process itself so killing the
186+ // shell closes stdout/stderr immediately; a spawned sleep child would
187+ // keep inherited pipes open and make the test wait for the child.
188+ CodexClientConfig config = configFor ("/bin/sh " + SLOW_CODEX_SCRIPT );
187189 config .setLocalTimeoutSeconds (1 );
188190 CodexCliExecutor executor = new CodexCliExecutor (config );
189191
190- CodexCliResult result = executor .execute ("-c" , "sleep 60" );
192+ CodexCliResult result = executor .execute ();
191193
192194 // On macOS/Linux the watchdog kills the process; the exit code is -1
193195 // and stderr contains the timeout notice.
You can’t perform that action at this time.
0 commit comments