Keep three timeout tests' upper bounds well under the production timeouts, so a timeout that falls back to production still fails (issue 1814, review round 3)
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -29,8 +29,8 @@ func TestATimedOutCommandIsEndedWithItsChildren(t *testing.T) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) // long enough for a loaded machine to start the shell and write the pid
|
||||
defer cancel()
|
||||
start := time.Now()
|
||||
r := ExecRunner(ctx, "sh", "-c", "sleep 30 & echo $! > "+pidFile+"; wait")
|
||||
if took := time.Since(start); took > 30*time.Second {
|
||||
r := ExecRunner(ctx, "sh", "-c", "sleep 300 & echo $! > "+pidFile+"; wait")
|
||||
if took := time.Since(start); took > 10*time.Second {
|
||||
t.Fatalf("the call waited %s for a child holding its output", took)
|
||||
}
|
||||
if !r.TimedOut {
|
||||
|
||||
Reference in New Issue
Block a user