Skip to content

Commit 0e25a79

Browse files
NicorettiLMG
authored andcommitted
Add counter for proxy integration test to prevent endless loop(s)
In some development environments the josh-proxy integration tests end up in an endless loop. The root cause is not yet identified. Therefore an additional counter have been added, to make sure the developer gets a failing test as feedback, instead of getting stuck in an endless loop for no obvious reason.
1 parent db4ab99 commit 0e25a79

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/proxy/setup_test_env.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ ${TESTDIR}/../../target/debug/josh-proxy\
2929
> ${TESTTMP}/josh-proxy.out 2>&1 &
3030
echo $! > ${TESTTMP}/proxy_pid
3131

32+
COUNTER=0
3233
until curl -s http://localhost:8002/
3334
do
3435
sleep 0.1
35-
done
36+
COUNTER=$((COUNTER + 1))
37+
if [ $COUNTER -ge 10 ];
38+
then
39+
>& echo "Starting josh proxy timed out"
40+
exit 1
41+
fi
42+
done

0 commit comments

Comments
 (0)