mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
run-tests.sh: timeout after a minute
This commit is contained in:
parent
4da081374c
commit
afdb0d7b80
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@ -92,6 +92,9 @@ jobs:
|
||||
matrix:
|
||||
# test with unlimited + 1 + 2 max db conns. If we end up double transacting in the tests anywhere, conn=1 tests will fail.
|
||||
max_db_conns: [0,1,2]
|
||||
# If the server fails to start, we'll wait for GHA to cancel the job after 6 hours.
|
||||
# Ensure we fail sooner than that to avoid clogging up GHA runners.
|
||||
timeout-minutes: 30
|
||||
services:
|
||||
synapse:
|
||||
# Custom image built from https://github.com/matrix-org/synapse/tree/v1.72.0/docker/complement with a dummy /complement/ca set
|
||||
|
@ -10,10 +10,16 @@ SYNCV3_PID=$!
|
||||
trap "kill $SYNCV3_PID" EXIT
|
||||
|
||||
# wait for the server to be listening, we want this endpoint to 404 instead of connrefused
|
||||
attempts=0
|
||||
until [ \
|
||||
"$(curl -s -w '%{http_code}' -o /dev/null "http://localhost:8844/idonotexist")" \
|
||||
-eq 404 ]
|
||||
do
|
||||
((attempts++))
|
||||
if [ "$attempts" -gt 60 ]; then
|
||||
echo "Server did not start after $attempts seconds" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
echo 'Waiting for server to start...'
|
||||
sleep 1
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user