Merge pull request #1321 from CarlosNihelton/tcp-no-timeout
[system_setup] Avoid integration test failure due server exited
This commit is contained in:
commit
b6bb0cca5e
|
@ -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
|
||||||
|
@ -243,6 +242,7 @@ if [ "${RELEASE%.*}" -ge 20 ]; then
|
||||||
done
|
done
|
||||||
if [ $next_time -eq 0 ]; then
|
if [ $next_time -eq 0 ]; then
|
||||||
echo "Timeout reached before Subiquity TCP socket started listening"
|
echo "Timeout reached before Subiquity TCP socket started listening"
|
||||||
|
kill $subiquity_pid || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
loopback_failed=0
|
loopback_failed=0
|
||||||
|
@ -268,7 +268,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