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

test(hybrid-cloud): Stabilizes sentry app install tests #53004

Merged
merged 4 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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/services/hybrid_cloud/organization/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Any, Iterable, List, Mapping, Optional, Set, Union, cast

from django.db import IntegrityError, models, transaction
from django.db import IntegrityError, models, router, transaction
from django.dispatch import Signal

from sentry import roles
Expand Down Expand Up @@ -491,7 +491,7 @@ def update_region_user(self, *, user: RpcRegionUser, region_name: str) -> None:
# Normally, calling update on a QS for organization member fails because we need to ensure that updates to
# OrganizationMember objects produces outboxes. In this case, it is safe to do the update directly because
# the attribute we are changing never needs to produce an outbox.
with unguarded_write():
with unguarded_write(using=router.db_for_write(OrganizationMember)):
OrganizationMember.objects.filter(user_id=user.id).update(
user_is_active=user.is_active, user_email=user.email
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def setUp(self):
)


@control_silo_test()
@control_silo_test(stable=True)
class GetSentryAppInstallationDetailsTest(SentryAppInstallationDetailsTest):
def test_access_within_installs_organization(self):
self.login_as(user=self.user)
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/deletions/test_sentry_app_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from sentry.testutils.outbox import outbox_runner


class TestSentryAppIntallationDeletionTask(TestCase):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized this was misspelled as I was fixing the test 😅

class TestSentryAppInstallationDeletionTask(TestCase):
def setUp(self):
self.user = self.create_user()
self.org = self.create_organization()
Expand Down
Loading