Skip to content

Conversation

@cvxluo
Copy link
Contributor

@cvxluo cvxluo commented Feb 10, 2026

Fixes the flaky test test_same_group_different_environment.

The flakiness was caused by a redundant re-assertion of event1 after event2 was created. This assertion was inconsistent with other tests in the ReleaseIssueTest class and introduced a potential race condition due to database transaction timing issues when querying immediately after event2's creation.

Removing this unnecessary re-assertion resolves the flakiness and aligns the test with the established pattern in the test suite.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.


Linear Issue: ID-1341

Open in Cursor Open in Web

…nvironment

The test had a redundant re-assertion of event1 after creating event2,
which was inconsistent with other tests in the ReleaseIssueTest class
and prone to database transaction timing issues.

Since event2 is created in a different environment (environment2),
it should not affect event1's ReleaseProjectEnvironment (environment1).
The redundant assertion was likely catching race conditions where
database queries executed before transactions were fully committed.

This fix makes the test consistent with test_different_groups and
test_same_group, which only assert each event once.

Fixes: ID-1341

Co-authored-by: Charlie Luo <cvxluo@gmail.com>
@cursor
Copy link
Contributor

cursor bot commented Feb 10, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@linear
Copy link

linear bot commented Feb 10, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants