Skip to content

Commit 78d3349

Browse files
authored
fix(seer grouping): Fix flaky feature enablement test (#74664)
In the `test_obeys_feature_enablement_check` test, we currently check 8 cases, and if those checks happen fast enough, we end up hitting the project rate limit of 5 requests/sec. They sometimes do and sometimes don't, making the test flaky. This patches the rate limit check to always return `False` to get rid of the flake.
1 parent 68c6cf5 commit 78d3349

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/sentry/grouping/ingest/test_seer.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,15 @@ def test_obeys_feature_enablement_check(self):
5959
(False, True, 11211231, True),
6060
(True, True, 11211231, True),
6161
]:
62-
with Feature(
63-
{
64-
"projects:similarity-embeddings-metadata": metadata_flag,
65-
"projects:similarity-embeddings-grouping": grouping_flag,
66-
}
62+
with (
63+
Feature(
64+
{
65+
"projects:similarity-embeddings-metadata": metadata_flag,
66+
"projects:similarity-embeddings-grouping": grouping_flag,
67+
}
68+
),
69+
# Having too many cases above makes us hit the project rate limit if we don't patch this
70+
patch("sentry.grouping.ingest.seer._ratelimiting_enabled", return_value=False),
6771
):
6872
self.project.update_option(
6973
"sentry:similarity_backfill_completed", backfill_completed_option

0 commit comments

Comments
 (0)