Increase testExecDetachProcessRunning sleep margin to avoid CI flake (#2063)

This commit is contained in:
J Logan
2026-08-03 15:27:58 -07:00
committed by GitHub
parent 4ed47cbe33
commit 520371cb38
@@ -77,14 +77,15 @@ struct TestCLIExecCommand {
try f.doStart(name)
try await f.waitForContainerRunning(name)
let output = try f.doExec(name, cmd: ["sleep", "10"], detach: true)
// Generous duration: ContainersService's host-wide lock can queue this exec's start behind other containers' multi-second VM boots.
let output = try f.doExec(name, cmd: ["sleep", "60"], detach: true)
try #require(
output.trimmingCharacters(in: .whitespacesAndNewlines) == name,
"exec --detach should print the container name")
let ps = try f.doExec(name, cmd: ["ps", "aux"])
.trimmingCharacters(in: .whitespacesAndNewlines)
try #require(ps.contains("sleep 10"), "detached 'sleep 10' should appear in ps output")
try #require(ps.contains("sleep 60"), "detached 'sleep 60' should appear in ps output")
try f.doStop(name)
}