openedx / openedx/openedx-platform
[Flaky test] `xmodule/partitions/tests/test_partitions.py::TestPartitionService::test_get_user_group_id_for_partition`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
This test fails intermittently and has been deleted according to the Flaky Test Process in https://github.com/openedx/edx-platform/pull/35545.
See docs on how to address flaky tests for why this should be fixed and how to go about it.
- Failing CI run: https://github.com/openedx/edx-platform/actions/runs/11038973818/job/30663409464
- Subsequent Passing CI run: https://github.com/openedx/edx-platform/actions/runs/11038973818/job/30667857626
Related: https://github.com/openedx/edx-platform/issues/35641
__________ TestPartitionService.test_get_user_group_id_for_partition ___________
self = <xmodule.partitions.tests.test_partitions.TestPartitionService testMethod=test_get_user_group_id_for_partition>
def test_get_user_group_id_for_partition(self):
# assign the first group to be returned
user_partition_id = self.user_partition.id
groups = self.user_partition.groups
self.user_partition.scheme.current_group = groups[0]
# get a group assigned to the user
group1_id = self.partition_service.get_user_group_id_for_partition(self.user, user_partition_id)
> assert group1_id == groups[0].id
E AssertionError: assert 1 == 0
E + where 0 = Group(id=0, name='Group 1').id
xmodule/partitions/tests/test_partitions.py:473: AssertionError
(Previously filed as https://2u-internal.atlassian.net/browse/CR-7071)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with xmodule/partitions/tests/test_partitions.py::TestPartitionService::test_get_user_group_id_for_partition and compare the failing and subsequent passing CI runs linked in the issue. Follow the Flaky Test Process guidance to identify why the expected group ID intermittently differs, then restore the test after addressing the cause and verify it passes consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100