mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
test/system: fix "quadlet kube - start error" flake
The test flakes on the socat pid kill when the pid already exited. Because the timeout is just 10s we can just bump it to something loinger to ensure the process is still alive when we kill it. Also move it up a bit so the kill happens earlier. I observed multiple time failing with test times of 11s+. This should be enough to make it work properly. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
48594b61c8
commit
c1ffafe5b7
1 changed files with 3 additions and 3 deletions
|
|
@ -1322,7 +1322,7 @@ spec:
|
|||
EOF
|
||||
|
||||
# Bind the port to force a an error when starting the pod
|
||||
timeout --foreground -v --kill=10 10 socat TCP-LISTEN:$port,bind=127.0.0.1,fork - &
|
||||
timeout --foreground -v --kill=10 20 socat TCP-LISTEN:$port,bind=127.0.0.1,fork - &
|
||||
socat_pid=$!
|
||||
|
||||
# Create the Quadlet file
|
||||
|
|
@ -1341,14 +1341,14 @@ EOF
|
|||
echo $output
|
||||
assert $status -eq 1 "systemctl start should report failure"
|
||||
|
||||
kill "$socat_pid"
|
||||
|
||||
run -0 systemctl show --property=ActiveState $QUADLET_SERVICE_NAME
|
||||
assert "$output" == "ActiveState=failed" "unit must be in failed state"
|
||||
|
||||
echo "$_LOG_PROMPT journalctl -u $QUADLET_SERVICE_NAME"
|
||||
run -0 journalctl -eu $QUADLET_SERVICE_NAME
|
||||
assert "$output" =~ "$port.*ddress already in use" "journal contains the real podman start error"
|
||||
|
||||
kill "$socat_pid"
|
||||
}
|
||||
|
||||
# https://github.com/containers/podman/issues/25786
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue