gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: make test more robu


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: make test more robust
Date: Thu, 05 Sep 2019 11:59:17 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 1576a1d0 make test more robust
1576a1d0 is described below

commit 1576a1d048d42f7d74b5eef428ba4816266ae615
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Sep 5 11:59:10 2019 +0200

    make test more robust
---
 src/auditor/test-auditor.sh | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index f84c7938..5ac01943 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -198,19 +198,29 @@ jq -e .wire_format_inconsistencies[0] < 
test-wire-audit.json > /dev/null && exit
 echo PASS
 
 echo -n "Check for lag detection... "
+
 # Check wire transfer lag reported (no aggregator!)
 # NOTE: This test is EXPECTED to fail for ~1h after
 # re-generating the test database as we do not
 # report lag of less than 1h (see GRACE_PERIOD in
 # taler-wire-auditor.c)
-jq -e .lag_details[0] < test-wire-audit.json > /dev/null || exit_fail "Lag not 
detected in run without aggregator"
-
-LAG=`jq -r .total_amount_lag < test-wire-audit.json`
-if test $LAG = "TESTKUDOS:0"
+AGE=`stat -c %Y ../benchmark/auditor-basedb.fees`
+NOW=`date +%s`
+DELTA=`expr $NOW - $AGE`
+if [ $DELTA -gt 3600 ]
 then
-    exit_fail "Expected total lag to be non-zero"
+    jq -e .lag_details[0] < test-wire-audit.json > /dev/null || exit_fail "Lag 
not detected in run without aggregator at age $DELTA"
+
+    LAG=`jq -r .total_amount_lag < test-wire-audit.json`
+    if test $LAG = "TESTKUDOS:0"
+    then
+        exit_fail "Expected total lag to be non-zero"
+    fi
+    echo "PASS"
+else
+    echo "SKIP"
 fi
-echo "PASS"
+
 
 echo -n "Test for wire amounts... "
 WIRED=`jq -r .total_wire_in_delta_plus < test-wire-audit.json`

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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