Actions
Issue #9010
closedpost upgrade test is failing intermittently
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 100
Quarter:
Description
I am seeing the following in our CI from time to time:
pulpcore/tests/upgrade/post/test_publish.py::PublishAnyRepoVersionTestCase::test_all FAILED [ 50%]
pulpcore/tests/upgrade/post/test_publish.py::PublishAnyRepoVersionTestCase::test_custom_manifest PASSED [100%]
=================================== FAILURES ===================================
____________________ PublishAnyRepoVersionTestCase.test_all ____________________
self = <pulpcore.tests.upgrade.post.test_publish.PublishAnyRepoVersionTestCase testMethod=test_all>
def test_all(self):
"""Test whether a particular repository version can be published.
1. Create a repository with at least 2 repository versions.
2. Create a publication by supplying the latest ``repository_version``.
3. Assert that the publication ``repository_version`` attribute points
to the latest repository version.
4. Create a publication by supplying the non-latest ``repository_version``.
5. Create distribution.
6. Assert that the publication ``repository_version`` attribute points
to the supplied repository version.
7. Assert that an exception is raised when providing two different
repository versions to be published at same time.
"""
# Step 1
for file_content in get_content(self.repo.to_dict())[FILE_CONTENT_NAME]:
repository_modify_data = RepositoryAddRemoveContent(
remove_content_units=[file_content["pulp_href"]]
)
modify_response = self.repo_api.modify(self.repo.pulp_href, repository_modify_data)
monitor_task(modify_response.task)
version_hrefs = tuple(ver["pulp_href"] for ver in get_versions(self.repo.to_dict()))
> non_latest = choice(version_hrefs[:-1])
pulpcore/tests/upgrade/post/test_publish.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <random.Random object at 0x560e307bd6e0>, seq = ()
def choice(self, seq):
"""Choose a random element from a non-empty sequence."""
try:
i = self._randbelow(len(seq))
except ValueError:
> raise IndexError('Cannot choose from an empty sequence') from None
E IndexError: Cannot choose from an empty sequence
/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/random.py:261: IndexError
========================= 1 failed, 1 passed in 3.21s ==========================
Updated by pulpbot over 3 years ago
- Status changed from NEW to POST
Updated by fao89 over 3 years ago
- Assignee set to fao89
- Triaged changed from No to Yes
- Sprint set to Sprint 100
Added by Fabricio Aguiar over 3 years ago
Updated by Anonymous over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|c9c853b1a751d40f47aa6a3886b14cacce7daa93.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fix upgrade test
https://pulp.plan.io/issues/9010 closes #9010