Actions
Issue #5568
closedDownloadContentTestCase fails intermittently
Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Python:
Platform Release:
Target Release - Python:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
I would hesitate to say that this is an issue with the Python plugin, as in the past we've traced similar issues down to FedoraPeople hosting [0]. In any case it is an issue experienced first/only with the Python plugin.
The test fails intermittently. Run several times in succession locally, I had a few failures and a few successes, with no changes to the code or even restart to Pulp. The invalid checksum is consistent, it is the same every time it fails.
(pulp) [vagrant@pulp3-source-fedora30 pulp_python]$ pytest --verbose --color=yes --pyargs ./pulp_python/tests/functional/api/test_download_content.py::DownloadContentTestCase
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.7.3, pytest-5.2.1, py-1.8.0, pluggy-0.13.0 -- /usr/local/lib/pulp/bin/python3
cachedir: .pytest_cache
rootdir: /home/vagrant/devel/pulp_python
collected 1 item
pulp_python/tests/functional/api/test_download_content.py::DownloadContentTestCase::test_all PASSED [100%]
============================================================================================================= 1 passed in 7.28s ==============================================================================================================
(pulp) [vagrant@pulp3-source-fedora30 pulp_python]$ pytest --verbose --color=yes --pyargs ./pulp_python/tests/functional/api/test_download_content.py::DownloadContentTestCase
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.7.3, pytest-5.2.1, py-1.8.0, pluggy-0.13.0 -- /usr/local/lib/pulp/bin/python3
cachedir: .pytest_cache
rootdir: /home/vagrant/devel/pulp_python
collected 1 item
pulp_python/tests/functional/api/test_download_content.py::DownloadContentTestCase::test_all FAILED [100%]
================================================================================================================== FAILURES ==================================================================================================================
body['publication'] = publication['pulp_href']
distribution = client.using_handler(api.task_handler).post(
PYTHON_DISTRIBUTION_PATH,
body
)
self.addCleanup(client.delete, distribution['pulp_href'])
# Pick a file, and download it from both Pulp Fixtures…
unit_path = choice(get_python_content_paths(repo))
fixtures_hash = hashlib.sha256(
utils.http_get(urljoin(urljoin(PYTHON_FIXTURES_URL, 'packages/'), unit_path))
).hexdigest()
# …and Pulp.
content = download_content_unit(cfg, distribution, unit_path)
pulp_hash = hashlib.sha256(content).hexdigest()
> self.assertEqual(fixtures_hash, pulp_hash)
E AssertionError: '04cfd8bb4f843e35d51bfdef2035109bdea831b55a57c3e6a154d14be116398c' != '95b64c7261b6b34029edaa80d1f0dc530eefd906bbab2f171cb4481be1989ece'
E - 04cfd8bb4f843e35d51bfdef2035109bdea831b55a57c3e6a154d14be116398c
E + 95b64c7261b6b34029edaa80d1f0dc530eefd906bbab2f171cb4481be1989ece
pulp_python/tests/functional/api/test_download_content.py:96: AssertionError
============================================================================================================= 1 failed in 6.20s ==============================================================================================================
Related issues
Actions