Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): Attempt to fix flaky user creation again #86162

Merged
merged 1 commit into from
Mar 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sentry/testutils/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from typing import Any

import pytest
from django.db.utils import IntegrityError
from django.utils import timezone
from django.utils.functional import cached_property
from psycopg2.errors import UniqueViolation

from sentry.constants import ObjectStatus
from sentry.eventstore.models import Event
Expand Down Expand Up @@ -78,7 +78,7 @@ def user(self) -> User:
is_staff=True,
is_sentry_app=False,
)
except UniqueViolation:
except IntegrityError:
return User.objects.get(email="admin@localhost")

@cached_property
Expand Down
Loading