File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -86,19 +86,21 @@ jobs:
8686 - name : Wait for Durable Task Emulator to be ready
8787 run : |
8888 echo "Waiting for Durable Task Emulator to be ready on port 4001..."
89- max_attempts=60
89+ # Maximum wait time of 60 seconds for emulator startup
90+ MAX_WAIT_SECONDS=60
9091 attempt=0
91- while ! nc -z localhost 4001 2>/dev/null; do
92+ # Use bash's /dev/tcp for portability instead of nc
93+ while ! (echo > /dev/tcp/localhost/4001) 2>/dev/null; do
9294 attempt=$((attempt + 1))
93- if [ $attempt -ge $max_attempts ]; then
94- echo "ERROR: Emulator not ready after $max_attempts seconds"
95+ if [ $attempt -ge $MAX_WAIT_SECONDS ]; then
96+ echo "ERROR: Emulator not ready after $MAX_WAIT_SECONDS seconds"
9597 echo "Docker container status:"
9698 docker ps -a
9799 echo "Container logs:"
98100 docker logs durabletask-emulator 2>&1 | tail -50
99101 exit 1
100102 fi
101- echo "Attempt $attempt/$max_attempts - waiting for emulator..."
103+ echo "Attempt $attempt/$MAX_WAIT_SECONDS - waiting for emulator..."
102104 sleep 1
103105 done
104106 echo "Durable Task Emulator is ready on port 4001"
You can’t perform that action at this time.
0 commit comments