Skip to content

Commit

Permalink
log wait
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Dec 10, 2024
1 parent 226c406 commit 69e7a56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ jobs:
uses: docker/setup-buildx-action@v2

# Run the Python script that handles the build and execution
- name: Launch Docker Stack and run tests
- name: Launch Docker Stack
run: python3 main.py local

# Needs to be done in CI since docker stack does not support conditional waits
- name: Wait for minio
run: python3 main.py wait_for "http://localhost:9001/minio/health/live"

Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def wait_for_response(url: str):
if response.status_code == 200:
print(f"Got 200 response from {url} after {counter} seconds")
return
except requests.exceptions.ConnectionError:
pass
except requests.exceptions.ConnectionError as e:
print("Minio not ready yet. Got error:", e.with_traceback(None))
time.sleep(1)
counter += 1
raise RuntimeError(
Expand Down

0 comments on commit 69e7a56

Please sign in to comment.