1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

test: Allow up to 2 loops in the loop integration test

In the loop integration test, we detect looping via checking the expvars
of chasquid, and waiting for the loop counter to be 1.

However, if chasquid is fast enough, it will go up to 2 before the
detection notices. This is because the DSN that gets generated also
loops (as expected).
This commit is contained in:
Alberto Bertogli
2018-11-29 02:06:48 +00:00
parent 29709a0d58
commit 661f759c0c

View File

@@ -47,7 +47,9 @@ wget -q -o /dev/null -O .data-A/dbg-root http://localhost:1099/404 \
while sleep 0.1; do while sleep 0.1; do
wget -q -o /dev/null -O .data-A/vars http://localhost:1099/debug/vars wget -q -o /dev/null -O .data-A/vars http://localhost:1099/debug/vars
wget -q -o /dev/null -O .data-B/vars http://localhost:2099/debug/vars wget -q -o /dev/null -O .data-B/vars http://localhost:2099/debug/vars
if grep -q '"chasquid/smtpIn/loopsDetected": 1,' .data-?/vars; then # Allow for up to 2 loops to be detected, because if chasquid is fast
# enough the DSN will also loop before this check notices it.
if grep -q '"chasquid/smtpIn/loopsDetected": [12],' .data-?/vars; then
break break
fi fi
done done