We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff686de commit 792993eCopy full SHA for 792993e
tests/guardrails/test_guardrails_polite_guard.sh
@@ -28,8 +28,15 @@ function start_service() {
28
cd comps/guardrails/deployment/docker_compose/
29
docker compose up ${service_name} -d
30
sleep 15
31
+ max_retries=3
32
+ retries=0
33
until docker logs ${service_name} 2>&1 | grep -q "Application startup complete"; do
- echo "Waiting for application startup to complete..."
34
+ if [ $retries -ge $max_retries ]; then
35
+ echo "Application failed to start after $max_retries attempts."
36
+ exit 1
37
+ fi
38
+ echo "Waiting for application startup to complete... (Attempt $((retries + 1))/$max_retries)"
39
+ retries=$((retries + 1))
40
sleep 2 # Wait for 2 seconds before checking again
41
done
42
echo "Microservice started"
0 commit comments