gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: -fix non-deterministically faili


From: gnunet
Subject: [taler-merchant] branch master updated: -fix non-deterministically failing test due to competing wirewatch processes
Date: Sun, 03 Jul 2022 13:41:35 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 2daf5c45 -fix non-deterministically failing test due to competing 
wirewatch processes
2daf5c45 is described below

commit 2daf5c4566cd2b175e4f22646041eeaf4e8c81c5
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jul 3 13:41:33 2022 +0200

    -fix non-deterministically failing test due to competing wirewatch processes
---
 src/testing/initialize_taler_system.sh        | 5 ++---
 src/testing/test_merchant_reserve_creation.sh | 7 ++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/testing/initialize_taler_system.sh 
b/src/testing/initialize_taler_system.sh
index e8b947c9..0a822867 100755
--- 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
index 8f34a038..4ec23187 100755
--- 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)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]