pulp / pulp/pulpcore

test_purge_before_time isn't a reliable test

Open
#6,379 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue Tests
Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

Version
main

Describe the bug
The test_purge_before_time test fails sporadically in CI (often in the azure test). This is because it assumes things about what might be goingon with tasks in the system-under-test that are not necessarily true.

This causes failures in nightlies and PR checks. It would be good to refactor the test to only look for/depend on the tasks that it knows it's created.

To Reproduce
Unreliable - watch for failures in CI/PR checks. For now, see test failure (this will be removed at some point)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pulpcore/tests/functional/api/test_task_purge.py, especially test_purge_before_time at the linked line. Run the focused test and inspect how it creates and selects tasks. Done means the test asserts purge behavior using only tasks created by the test and no longer fails intermittently in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.