Avoid integration to fail due TCP server timeout

timeout 60 might be too short for someone with lots of network
interfaces.
Since we grab the PID and run the server in the background, the timeout
is not critically necessary.
This commit is contained in:
Carlos Nihelton 2022-06-16 16:43:44 -03:00
parent 44affdf0f2
commit 97f0f82910
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 2 additions and 3 deletions

View File

@ -234,8 +234,7 @@ if [ "${RELEASE%.*}" -ge 20 ]; then
# Test TCP connectivity (system_setup only)
clean
port=50321
LANG=C.UTF-8 timeout --foreground 60 \
python3 -m system_setup.cmd.server --dry-run --tcp-port=$port &
LANG=C.UTF-8 python3 -m system_setup.cmd.server --dry-run --tcp-port=$port &
subiquity_pid=$!
next_time=3
until [ $next_time -eq 0 ] || [ ! -z "$(ss -Hlt sport = $port)" ]; do
@ -268,7 +267,7 @@ if [ "${RELEASE%.*}" -ge 20 ]; then
fi
done
done
kill $subiquity_pid
kill $subiquity_pid || true
if [ $loopback_failed -ne 0 ]; then
echo "Loopback was expected to connect"
exit 1