Flaky test: tests/sentry/api/bases/test_organization.py::GetProjectIdsTest::test_get_projects_by_slugs_all
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
Failing test: `tests/sentry/api/bases/test_organization.py::GetProjectIdsTest::test_get_projects_by_slugs_all`
Sentry sha: 79bb9f2a1cdd9bbed8a76ffa261ee7328244e04b
Run: https://github.com/getsentry/sentry/actions/runs/22289152642
```
[1m[31mtests/sentry/api/bases/test_organization.py[0m:588: in test_get_projects_by_slugs_all
mock__filter_projects_by_permissions.assert_called_with(
[1m[31m/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py[0m:977: in assert_called_with
raise AssertionError(_error_message()) from cause
[1m[31mE AssertionError: expected call not found.[0m
[1m[31mE Expected: _filter_projects_by_permissions(projects=[, ], request=, filter_by_membership=False, force_global_perms=False, include_all_accessible=True)[0m
[1m[31mE Actual: _filter_projects_by_permissions(projects=[, ], request=, filter_by_membership=False, force_global_perms=False, include_all_accessible=True)[0m
```
Contributor guide
Research direction
Start by running tests/sentry/api/bases/test_organization.py::GetProjectIdsTest::test_get_projects_by_slugs_all and compare the expected and actual _filter_projects_by_permissions calls. Inspect the surrounding test and the implementation it exercises to determine why project ordering differs. Done means the test passes consistently without relying on unstable ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100