mirror of
https://github.com/containers/podman.git
synced 2025-06-30 15:49:03 +08:00
test/system: speed up podman container rm ...
Use only one retry and a short stop timeout to speed them up. I am not sure if this will cause flakes, I have not seen any after trying for some time so I think this works just as well. And is about 2-3 seconds faster for both tests. If it does start to flake we can revert this commit again or write the test differently. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -124,10 +124,10 @@ function __run_healthcheck_container() {
|
|||||||
run_podman run -d --name $1 \
|
run_podman run -d --name $1 \
|
||||||
--health-cmd /bin/false \
|
--health-cmd /bin/false \
|
||||||
--health-interval 1s \
|
--health-interval 1s \
|
||||||
--health-retries 2 \
|
--health-retries 1 \
|
||||||
--health-timeout 1s \
|
--health-timeout 1s \
|
||||||
--health-on-failure=stop \
|
--health-on-failure=stop \
|
||||||
--stop-timeout=2 \
|
--stop-timeout=1 \
|
||||||
--health-start-period 0 \
|
--health-start-period 0 \
|
||||||
--stop-signal SIGTERM \
|
--stop-signal SIGTERM \
|
||||||
$IMAGE sleep infinity
|
$IMAGE sleep infinity
|
||||||
@ -156,7 +156,7 @@ function __run_healthcheck_container() {
|
|||||||
assert "$output" =~ "Error: cannot remove container $cid as it is .* - running or paused containers cannot be removed without force: container state improper" \
|
assert "$output" =~ "Error: cannot remove container $cid as it is .* - running or paused containers cannot be removed without force: container state improper" \
|
||||||
"Expected error message from podman rm"
|
"Expected error message from podman rm"
|
||||||
rm_failures=$((rm_failures + 1))
|
rm_failures=$((rm_failures + 1))
|
||||||
sleep 1
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
# At this point, container should be gone
|
# At this point, container should be gone
|
||||||
|
Reference in New Issue
Block a user