openedx / openedx/openedx-platform
[Flaky test] `xmodule.partitions.tests.test_partitions.TestGetCourseUserPartitions.test_enrollment_track_partition_added`
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/edx/edx-platform/pull/27885.
See docs on how to address flaky tests for why this should be fixed and how to go about it.
- Failed and then passed in https://github.com/edx/edx-platform/pull/27881
- Failure in Jenkins: https://build.testeng.edx.org/job/edx-platform-python-pipeline-pr/31393/testReport/junit/xmodule.xmodule.partitions.tests.test_partitions/TestGetCourseUserPartitions/Run_Tests___commonlib_unit___test_enrollment_track_partition_added/ (no longer accessible)
Related: https://github.com/openedx/edx-platform/issues/35640
Failure output:
Regression
Run Tests / commonlib-unit / xmodule.xmodule.partitions.tests.test_partitions.TestGetCourseUserPartitions.test_enrollment_track_partition_added (from pytest)
Failing for the past 1 build (Since Failed#31393 )
Took 4 ms.
Error Message
AssertionError: assert 2 == 1
+2
-1
Stacktrace
self = <xmodule.partitions.tests.test_partitions.TestGetCourseUserPartitions testMethod=test_enrollment_track_partition_added>
def test_enrollment_track_partition_added(self):
"""
Test that the dynamic enrollment track scheme is added if there is no conflict with the user partition ID.
"""
all_partitions = get_all_partitions_for_course(self.course)
> assert 2 == len(all_partitions)
E AssertionError: assert 2 == 1
E +2
E -1
common/lib/xmodule/xmodule/partitions/tests/test_partitions.py:560: AssertionError
(Previously filed as https://2u-internal.atlassian.net/browse/CR-3732)
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 common/lib/xmodule/xmodule/partitions/tests/test_partitions.py around the deleted test at line 560, then read PR 27885 and the linked flaky-test guidance. Investigate why get_all_partitions_for_course sometimes returns one partition instead of two, reproduce the intermittent failure if possible, and ensure the enrollment-track partition behavior has stable regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100