Skip to content

Commit e65d60a

Browse files
Retry on exit code 7 (connection refused)
1 parent 9b6ba5c commit e65d60a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/pr-e2e-tests.yaml

+10-6
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ jobs:
6969
- name: Wait for Weaviate to start
7070
run: |
7171
count=0
72-
until curl --fail -s localhost:8080/v1/.well-known/ready; do
73-
((count++))
74-
if [ $count -ge 10 ]; then
75-
echo "Reached maximum retry limit"
76-
exit 1
72+
until curl -s localhost:8080/v1/.well-known/ready; do
73+
exit_code=$?
74+
# Check if the exit code is 22 (HTTP failure) or 7 (connection refused)
75+
if [ $exit_code -eq 22 ] || [ $exit_code -eq 7 ]; then
76+
((count++))
77+
if [ $count -ge 10 ]; then
78+
echo "Reached maximum retry limit"
79+
exit 1
80+
fi
81+
sleep 15
7782
fi
78-
sleep 15
7983
done
8084
- name: Run tests
8185
run: poetry run pytest ./tests/e2e

0 commit comments

Comments
 (0)