0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 17:24:15 +01:00
posthog/bin/check_temporal_up
Harry Waye b761a34b23
ci: fix waiting for temporal to be up in backend tests (#16039)
* ci: fix waiting for temporal to be up in backend tests

I think it got merged before because we weren't running the backend
tests on these script changes so I've also added them to the list of
paths to watch for changes.

* increase timeout to 180 seconds
2023-06-14 06:07:49 +00:00

24 lines
424 B
Bash
Executable File

#!/bin/bash
set -e
# Wait for Temporal to be ready
SECONDS=0
TIMEOUT=180
# Check Temporal by just checking that the port is open
while true; do
if nc -z localhost 7233; then
echo "Temporal is up!"
exit 0
fi
if [ $SECONDS -ge $TIMEOUT ]; then
echo "Timed out waiting for Temporal to be ready"
exit 1
fi
echo "Waiting for Temporal to be ready"
sleep 1
done