diff --git a/tests/helper.bash b/tests/helper.bash index 0e9be09..decf536 100755 --- a/tests/helper.bash +++ b/tests/helper.bash @@ -23,6 +23,8 @@ function gen_webhook() { function send_webhook { TMPFILE="$(mktemp)" echo -n "$2" > $TMPFILE + # To prevent race conditions where curl is started while $TMPFILE is still empty + sync # We can make a few attempts, just in case the webserver hasn't started yet n=0