From 1a3a5594a06cf2c7e589ad38469929789043969b Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 28 Feb 2023 13:24:23 +0100 Subject: [PATCH] fix "podman logs --since --follow" flake The test should make sure the logs --follow call will log entries that are created in the future when --since is used and doe not include the container start event. However it seems the timing is to tight. I think it was possible that CI logged the line before the logs call was made, thus it is missing because --since excluded it. I cannot reproduce so I am not 100% on this but we can reopen the issue if it still happens. Fixes #17616 Signed-off-by: Paul Holzinger --- test/system/035-logs.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats index 8f378054af..e0ee3ed14d 100644 --- a/test/system/035-logs.bats +++ b/test/system/035-logs.bats @@ -319,14 +319,14 @@ function _log_test_follow_since() { # Now do the same with a running container to check #16950. run_podman ${events_backend} run --log-driver=$driver --name $cname -d $IMAGE \ - sh -c "sleep 0.5; while :; do echo $content && sleep 3; done" + sh -c "sleep 1; while :; do echo $content && sleep 5; done" # sleep is required to make sure the podman event backend no longer sees the start event in the log # This value must be greater or equal than the the value given in --since below sleep 0.2 # Make sure podman logs actually follows by giving a low timeout and check that the command times out - PODMAN_TIMEOUT=2 run_podman 124 ${events_backend} logs --since 0.1s -f $cname + PODMAN_TIMEOUT=3 run_podman 124 ${events_backend} logs --since 0.1s -f $cname assert "$output" =~ "^$content timeout: sending signal TERM to command.*" "logs --since -f on running container works"