aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-24 17:54:09 +0100
committerGitHub <noreply@github.com>2022-02-24 17:54:09 +0100
commit7ec244aec2d3ebe36b7495a2321a05f02f0b4186 (patch)
treec9c86489b7c8ce2bcd99eb26ef71b38196aa98bb
parent5f88411af058cc97f322138ff9d13c0962a7e566 (diff)
parent9c470cb9694408078fa2c289b9b776820e611923 (diff)
Merge pull request #6159 from NixOS/more-eager-daemon-polling-in-tests
testS: poll more eagerly for the daemon start/stop
-rw-r--r--tests/common.sh.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index 61abab1d7..49068f1c3 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -91,9 +91,9 @@ startDaemon() {
# ‘nix-daemon’ should have an option to fork into the background.
rm -f $NIX_DAEMON_SOCKET_PATH
PATH=$DAEMON_PATH nix daemon &
- for ((i = 0; i < 30; i++)); do
+ for ((i = 0; i < 300; i++)); do
if [[ -S $NIX_DAEMON_SOCKET_PATH ]]; then break; fi
- sleep 1
+ sleep 0.1
done
pidDaemon=$!
trap "killDaemon" EXIT
@@ -102,9 +102,9 @@ startDaemon() {
killDaemon() {
kill $pidDaemon
- for i in {0.10}; do
+ for i in {0..100}; do
kill -0 $pidDaemon || break
- sleep 1
+ sleep 0.1
done
kill -9 $pidDaemon || true
wait $pidDaemon || true