commit 2daf5c4566cd2b175e4f22646041eeaf4e8c81c5
parent 09a8501e94ac33051299631022ae9e519ee58a99
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 3 Jul 2022 13:41:33 +0200
-fix non-deterministically failing test due to competing wirewatch processes
Diffstat:
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/testing/initialize_taler_system.sh b/src/testing/initialize_taler_system.sh
@@ -119,8 +119,6 @@ taler-wallet-cli --version
taler-exchange-httpd --version
taler-merchant-httpd --version
-echo " OK"
-
echo -n "Setting up exchange ..."
# reset database
@@ -144,6 +142,7 @@ EXCHANGE_HTTPD_PID=$!
taler-merchant-httpd -c $CONF -L DEBUG 2> taler-merchant-httpd.log &
MERCHANT_HTTPD_PID=$!
taler-exchange-wirewatch -c $CONF 2> taler-exchange-wirewatch.log &
+WIREWATCH_PID=$!
taler-auditor-httpd -L INFO -c $CONF 2> taler-auditor-httpd.log &
echo " OK"
@@ -172,7 +171,7 @@ echo -n "Waiting for taler services "
for n in `seq 1 20`
do
echo -n "."
- sleep 1
+ sleep 0.1
OK=0
# exchange
wget --tries=1 --timeout=1 http://localhost:8081/seed -o /dev/null -O /dev/null >/dev/null || continue
diff --git a/src/testing/test_merchant_reserve_creation.sh b/src/testing/test_merchant_reserve_creation.sh
@@ -79,10 +79,11 @@ fi
echo OK
-taler-exchange-wirewatch -c $CONF -t -L INFO
+# Stop existing background service, we need to run it here, now, and only once
+kill -TERM $WIREWATCH_PID
+wait $WIREWATCH_PID
-#there seems to be a race condition here so we wait
-sleep 1
+taler-exchange-wirewatch -c $CONF -t -L INFO
STATUS=$(curl 'http://localhost:9966/instances/default/private/reserves/'$RESERVE_PUB \
-w "%{http_code}" -s -o $LAST_RESPONSE)