@@ -24,15 +24,15 @@ mod invoke_command {
2424 fn no_input_does_not_block_on_stdin ( ) {
2525 let exit_codes = ExitCodesMap :: default ( ) ;
2626
27- // Use PowerShell's own async timeout so the child process always exits within ~5s ,
27+ // Use PowerShell's own async timeout so the child process always exits within ~2s ,
2828 // regardless of fix status. We never leave a hanging thread:
2929 // byte:-1 → ReadAsync got EOF immediately → stdin was null → PASS
30- // byte:-2 → ReadAsync timed out (5 s) → stdin was NOT null → FAIL
30+ // byte:-2 → ReadAsync timed out (2 s) → stdin was NOT null → FAIL
3131 let ps_command = concat ! (
3232 "$reader = [Console]::OpenStandardInput();" ,
3333 "$buf = [byte[]]::new(1);" ,
3434 "$task = $reader.ReadAsync($buf, 0, 1);" ,
35- "$completed = $task.Wait(5000 );" ,
35+ "$completed = $task.Wait(2000 );" ,
3636 "$b = if ($completed) { if ($task.Result -eq 0) { -1 } else { $buf[0] } } else { -2 };" ,
3737 "Write-Output \" byte:$b\" "
3838 ) ;
@@ -54,7 +54,7 @@ mod invoke_command {
5454 let ( exit_code, stdout, _stderr) = result;
5555 assert_eq ! ( exit_code, 0 , "Command should exit 0" ) ;
5656 // -1 means ReadAsync got EOF immediately, confirming stdin was set to null.
57- // -2 means stdin was open (inherited) and the read timed out after 5s .
57+ // -2 means stdin was open (inherited) and the read timed out after 2s .
5858 assert ! (
5959 stdout. contains( "byte:-1" ) ,
6060 "Expected EOF (byte:-1) from null stdin, got: {stdout:?}\n \
0 commit comments