Skip to content

Commit 520371c

Browse files
authored
Increase testExecDetachProcessRunning sleep margin to avoid CI flake (#2063)
1 parent 4ed47cb commit 520371c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Tests/IntegrationTests/Containers/TestCLIExecCommand.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,15 @@ struct TestCLIExecCommand {
7777
try f.doStart(name)
7878
try await f.waitForContainerRunning(name)
7979

80-
let output = try f.doExec(name, cmd: ["sleep", "10"], detach: true)
80+
// Generous duration: ContainersService's host-wide lock can queue this exec's start behind other containers' multi-second VM boots.
81+
let output = try f.doExec(name, cmd: ["sleep", "60"], detach: true)
8182
try #require(
8283
output.trimmingCharacters(in: .whitespacesAndNewlines) == name,
8384
"exec --detach should print the container name")
8485

8586
let ps = try f.doExec(name, cmd: ["ps", "aux"])
8687
.trimmingCharacters(in: .whitespacesAndNewlines)
87-
try #require(ps.contains("sleep 10"), "detached 'sleep 10' should appear in ps output")
88+
try #require(ps.contains("sleep 60"), "detached 'sleep 60' should appear in ps output")
8889

8990
try f.doStop(name)
9091
}

0 commit comments

Comments
 (0)