mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-28 00:46:45 +01:00
b761a34b23
* 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
24 lines
424 B
Bash
Executable File
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
|