Skip to content

Commit

Permalink
catch exception for general httpx networkerror
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdeng123 committed Mar 25, 2024
1 parent 2ccd1a5 commit 82eed1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ jobs:
- name: Setup dev environment
run: |
pip install -r requirements-dev.txt
echo "PY_COLORS=1" >> "$GITHUB_ENV"
### pytest-sentry configuration ###
if [ "$GITHUB_REPOSITORY" = "getsentry/self-hosted" ]; then
echo "PYTEST_SENTRY_DSN=$SELF_HOSTED_TESTING_DSN" >> $GITHUB_ENV
echo "PYTEST_SENTRY_TRACES_SAMPLE_RATE=0.0" >> $GITHUB_ENV
echo "PYTEST_SENTRY_TRACES_SAMPLE_RATE=0" >> $GITHUB_ENV
# This records failures on master to sentry in order to detect flakey tests, as it's
# expected that people have failing tests on their PRs
Expand Down
2 changes: 1 addition & 1 deletion _integration-test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def configure_self_hosted_environment(request):
for i in range(TIMEOUT_SECONDS):
try:
response = httpx.get(SENTRY_TEST_HOST, follow_redirects=True)
except httpx.ConnectError:
except httpx.NetworkError:
time.sleep(1)
else:
if response.status_code == 200:
Expand Down

0 comments on commit 82eed1e

Please sign in to comment.