Skip to content

Conversation

@shanbady
Copy link
Contributor

What are the relevant tickets?

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

Description (What does it do?)

This PR fixes a flaky test that fails due to unexpected runs created within the factory.

This PR also includes a change to add pytest-repeat which allows us to run tests x amount of times via pytest --count n

How can this be tested?

  1. checkout main
  2. manually install pytest-repeat poetry add pytest-repeat
  3. run pytest --count 100 vector_search/tasks_test.py::test_embeddings_healthcheck_missing_both --pdb -x -s and see it fail
  4. checkout this branch and re-run. tests should always pass

@shanbady shanbady changed the title setting create_runs=False in factory init Flaky test fix <vector_search/tasks_test.py::test_embeddings_healthcheck_missing_both> Nov 20, 2025
@shanbady shanbady changed the title Flaky test fix <vector_search/tasks_test.py::test_embeddings_healthcheck_missing_both> Flaky test vector_search/tasks_test.py::test_embeddings_healthcheck_missing_both Nov 20, 2025
@shanbady shanbady marked this pull request as ready for review November 20, 2025 15:29
@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Nov 20, 2025
@abeglova abeglova self-assigned this Nov 21, 2025
Copy link
Contributor

@abeglova abeglova 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 merged commit 8c99765 into main Nov 21, 2025
13 checks passed
@shanbady shanbady deleted the shanbady/flaky-test_embeddings_healthcheck_missing_both branch November 21, 2025 15:42
@odlbot odlbot mentioned this pull request Nov 24, 2025
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants