File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change 9090 run : sudo apt-get update && sudo apt-get install -y curl
9191 shell : bash
9292
93- - name : Wait for the SDP to be up
93+ - name : Define helper functions
9494 run : |
9595 wait_for_server() {
9696 local endpoint=$1
@@ -107,7 +107,10 @@ jobs:
107107 done
108108 echo "Server at $endpoint is up."
109109 }
110+ shell : bash
110111
112+ - name : Wait for the SDP to be up
113+ run : |
111114 wait_for_server http://localhost:8000/health 120
112115 wait_for_server http://localhost:8003/health 120
113116 shell : bash
@@ -124,22 +127,6 @@ jobs:
124127
125128 - name : Wait for the Anchor Platform to be up
126129 run : |
127- wait_for_server() {
128- local endpoint=$1
129- local max_wait_time=$2
130-
131- SECONDS=0
132- while ! curl -s $endpoint > /dev/null; do
133- echo "Waiting for server at $endpoint to be up... $SECONDS seconds elapsed"
134- sleep 4
135- if [ $SECONDS -ge $max_wait_time ]; then
136- echo "Server at $endpoint is not up after $max_wait_time seconds."
137- exit 1
138- fi
139- done
140- echo "Server at $endpoint is up."
141- }
142-
143130 wait_for_server http://localhost:8080/health 120
144131 wait_for_server http://localhost:8085/health 120
145132 shell : bash
You can’t perform that action at this time.
0 commit comments