1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +00:00

Test suite: Wait 2 seconds after reloading the daemon

On reload, all listening ports are closed, configuration updated, and
then opened again. Which leads to subsequent tests running while the
daemon isn't listening on any ports, and that's why the tests fail.

The "proper" way whould be to loop and check for open ports, but waiting
is what the start-server.sh script does right now, so stick with this in
reload-server.sh for now as well.

This fixes the issue, at least on my RaspberryPi ...

Closes #280.
This commit is contained in:
Alexander Barton 2020-11-01 17:25:39 +01:00
parent 6e382889a3
commit 5cf0eabd84

View File

@ -22,10 +22,11 @@ if [ -z "$pid" ]; then
fi fi
kill -HUP $pid > /dev/null 2>&1; r=$? kill -HUP $pid > /dev/null 2>&1; r=$?
if [ $r -eq 0 ]; then if [ $r -eq 0 ]; then
sleep 2
echo " ok". echo " ok".
exit 0 kill -0 $pid && exit 0
fi fi
echo " failure: server ${id} could not be restarted" echo " failure: server ${id} could not be reloaded!"
exit 1 exit 1
# -eof- # -eof-