Merge pull request #20928 from edsantiago/flakey_since

CI: systests: fix flaking --since test
This commit is contained in:
openshift-merge-bot[bot] 2023-12-07 17:36:51 +00:00 committed by GitHub
commit f8c031170b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -182,8 +182,10 @@ function _log_test_since() {
before=$(date --iso-8601=seconds)
run_podman run --log-driver=$driver -d --name test $IMAGE sh -c \
"echo $s_before; trap 'echo $s_after; exit' SIGTERM; while :; do sleep 0.1; done"
wait_for_output "$s_before" test
# sleep a second to make sure the date is after the first echo
# (We could instead use iso-8601=ns but seconds feels more real-world)
sleep 1
after=$(date --iso-8601=seconds)
run_podman stop test

View File

@ -442,7 +442,7 @@ function run_podman() {
# Wait for certain output from a container, indicating that it's ready.
function wait_for_output {
local sleep_delay=5
local sleep_delay=1
local how_long=$PODMAN_TIMEOUT
local expect=
local cid=