summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2020-11-01 17:25:39 +0100
committerAlexander Barton <alex@barton.de>2020-11-01 17:25:39 +0100
commit5cf0eabd841b644eef8022dad97fa96aa3661c6a (patch)
treebf06e354c3806d767f860f8fdf13fa17748c4ef5 /src
parent6e382889a30462382e84a426874881d2f7da80e4 (diff)
downloadngircd-5cf0eabd841b644eef8022dad97fa96aa3661c6a.tar.gz
ngircd-5cf0eabd841b644eef8022dad97fa96aa3661c6a.zip
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/testsuite/reload-server.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testsuite/reload-server.sh b/src/testsuite/reload-server.sh
index b17d6721..1f82d8eb 100755
--- a/src/testsuite/reload-server.sh
+++ b/src/testsuite/reload-server.sh
@@ -22,10 +22,11 @@ if [ -z "$pid" ]; then
 fi
 kill -HUP $pid > /dev/null 2>&1; r=$?
 if [ $r -eq 0 ]; then
+  sleep 2
   echo " ok".
-  exit 0
+  kill -0 $pid && exit 0
 fi
-echo " failure: server ${id} could not be restarted"
+echo " failure: server ${id} could not be reloaded!"
 exit 1
 
 # -eof-