mirror of https://github.com/containers/podman.git
Merge pull request #20928 from edsantiago/flakey_since
CI: systests: fix flaking --since test
This commit is contained in:
commit
f8c031170b
|
|
@ -182,8 +182,10 @@ function _log_test_since() {
|
||||||
before=$(date --iso-8601=seconds)
|
before=$(date --iso-8601=seconds)
|
||||||
run_podman run --log-driver=$driver -d --name test $IMAGE sh -c \
|
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"
|
"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
|
# 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
|
sleep 1
|
||||||
after=$(date --iso-8601=seconds)
|
after=$(date --iso-8601=seconds)
|
||||||
run_podman stop test
|
run_podman stop test
|
||||||
|
|
|
||||||
|
|
@ -442,7 +442,7 @@ function run_podman() {
|
||||||
|
|
||||||
# Wait for certain output from a container, indicating that it's ready.
|
# Wait for certain output from a container, indicating that it's ready.
|
||||||
function wait_for_output {
|
function wait_for_output {
|
||||||
local sleep_delay=5
|
local sleep_delay=1
|
||||||
local how_long=$PODMAN_TIMEOUT
|
local how_long=$PODMAN_TIMEOUT
|
||||||
local expect=
|
local expect=
|
||||||
local cid=
|
local cid=
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue