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