[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 01/02: tests: Avoid race condition in systemd test.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 01/02: tests: Avoid race condition in systemd test. |
Date: |
Thu, 23 Nov 2023 17:25:13 -0500 (EST) |
civodul pushed a commit to branch master
in repository shepherd.
commit e5d6ab78f5ed2d7e198ab0c3d79245661adb1355
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 23 23:14:17 2023 +0100
tests: Avoid race condition in systemd test.
* tests/systemd.sh: In ‘for’ loop, wait until ‘test-systemd-unix’ has
actually been respawned.
---
tests/systemd.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/systemd.sh b/tests/systemd.sh
index 4346252..72c8ee1 100644
--- a/tests/systemd.sh
+++ b/tests/systemd.sh
@@ -100,6 +100,12 @@ for i in $(seq 1 3)
do
converse_with_echo_server \
"(make-socket-address AF_UNIX \"$service_socket\")"
+
+ # Wait until the service has been respawned.
+ until $herd status test-systemd-unix | grep running
+ do
+ sleep 0.1
+ done
done
$herd stop test-systemd-unix