Skip to content

Conversation

mbertrand
Copy link
Member

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/8583

Description (What does it do?)

Fixes the intermittent test failures

How can this be tested?

  • On docker container, pip install pytest-repeat
  • Run pytest learning_resources/tasks_test.py::test_get_content_tasks --count 100 -x, test should pass every time.

@mbertrand mbertrand added the Needs Review An open Pull Request that is ready for review label Sep 17, 2025
learning_resources = LearningResource.objects.filter(
id__in=learning_resource_ids, etl_source=etl_source
).values_list("id", flat=True)
).order_by("-id").values_list("id", flat=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since else block below is ordered by -id, I decided to do it here too for consistency.

@shanbady shanbady self-requested a review September 18, 2025 14:11
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Sep 18, 2025
@mbertrand mbertrand merged commit e7438c5 into main Sep 18, 2025
13 checks passed
@mbertrand mbertrand deleted the mb/fix_flaky_test branch September 18, 2025 19:11
This was referenced Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants