Skip to content

Commit

Permalink
fix(tests): Attempt to fix flaky user creation again
Browse files Browse the repository at this point in the history
We caught the wrong error here, trying again
  • Loading branch information
wedamija committed Mar 1, 2025
1 parent e03c15a commit bd68135
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit bd68135

Please sign in to comment.