From 645988e8a04904db822d00679787fca95980a5c0 Mon Sep 17 00:00:00 2001 From: apostasie Date: Wed, 16 Oct 2024 16:00:01 -0700 Subject: [PATCH] Add delay to tentatively fix flakyness with Docker Signed-off-by: apostasie --- cmd/nerdctl/container/container_logs_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/nerdctl/container/container_logs_test.go b/cmd/nerdctl/container/container_logs_test.go index ec9fbd2ce70..085c5f840c6 100644 --- a/cmd/nerdctl/container/container_logs_test.go +++ b/cmd/nerdctl/container/container_logs_test.go @@ -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 == "") {