Project

Profile

Help

Issue #9010

post upgrade test is failing intermittently

Added by dkliban@redhat.com 3 months ago. Updated 28 days ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
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 ==========================

Associated revisions

Revision c9c853b1 View on GitHub
Added by Fabricio Aguiar 2 months ago

Fix upgrade test

https://pulp.plan.io/issues/9010 closes #9010

History

#1 Updated by pulpbot 3 months ago

  • Status changed from NEW to POST

#2 Updated by fao89 2 months ago

  • Assignee set to fao89
  • Triaged changed from No to Yes
  • Sprint set to Sprint 100

#3 Updated by Anonymous 2 months ago

  • Status changed from POST to MODIFIED

#4 Updated by pulpbot 28 days ago

  • Sprint/Milestone set to 3.15.0

#5 Updated by pulpbot 28 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF