Skip to content

Commit

Permalink
Add delay to tentatively fix flakyness with Docker
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Oct 16, 2024
1 parent 427f1cb commit 645988e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/nerdctl/container/container_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func TestLogsWithInheritedFlags(t *testing.T) {
base.Cmd("run", "-d", "--name", containerName, testutil.CommonImage,
"sh", "-euxc", "echo foo; echo bar").AssertOK()

// It appears this test flakes out with Docker seeing only "foo\n"
// Tentatively adding a pause in case this is just slow
time.Sleep(time.Second)
// test rootCmd alias `-n` already used in logs subcommand
base.Cmd("logs", "-n", "1", containerName).AssertOutWithFunc(func(stdout string) error {
if !(stdout == "bar\n" || stdout == "") {
Expand Down

0 comments on commit 645988e

Please sign in to comment.