Prevent some race condition making test fail sometime
Saving the webhook to /tmp was sometimes not finished before curl was caused, resulting in an empty payload -> validation error Passing via STDIN could be an alternative...
This commit is contained in:
parent
9f17e49114
commit
eab07ba4d8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue