Project

Profile

Help

Issue #8911

closed

Fix pull test that fails interminently

Added by ipanova@redhat.com over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

https://github.com/pulp/pulp_container/runs/2839308118

The test would fail some times because the artifact after being streamed to the client would not be saved before assertion for the artifact_count

def test_pull_image_from_repository(self):
        """Verify that a client can pull the image from Pulp (on-demand).
    
        1. Using the RegistryClient pull the image from Pulp.
        2. Pull the same image from remote registry.
        3. Verify both images has the same checksum.
        4. Verify that the number of artifacts in Pulp has increased.
        5. Ensure image is deleted after the test.
        """
        registry = cli.RegistryClient(self.cfg)
        registry.raise_if_unsupported(unittest.SkipTest, "Test requires podman/docker")
        registry.login("-u", "admin", "-p", "password", self.registry_name)
    
        local_url = urljoin(self.cfg.get_base_url(), self.distribution_with_repo.base_path)
    
        registry.pull(local_url)
        self.teardown_cleanups.append((registry.rmi, local_url))
        local_image = registry.inspect(local_url)
    
        registry.pull(REPO_UPSTREAM_NAME)
        remote_image = registry.inspect(REPO_UPSTREAM_NAME)
    
        self.assertEqual(local_image[0]["Id"], remote_image[0]["Id"])
    
        new_artifact_count = self.artifacts_api.list().count
>       self.assertGreater(new_artifact_count, self.artifact_count)
E       AssertionError: 33 not greater than 33

Related issues

Is duplicate of Pulp - Issue #8980: content app finishes servicing on_demand content requests before artifacts are fully savedCLOSED - CURRENTRELEASEdkliban@redhat.comActions
Actions #1

Updated by ipanova@redhat.com over 3 years ago

  • Subject changed from Fix test that fails interminently to Fix pull test that fails interminently
Actions #2

Updated by ipanova@redhat.com over 3 years ago

closing in favor or the issue reported in pulpcore since more plugins are suffering from this issue https://pulp.plan.io/issues/8980

Actions #3

Updated by ipanova@redhat.com over 3 years ago

  • Is duplicate of Issue #8980: content app finishes servicing on_demand content requests before artifacts are fully saved added
Actions #4

Updated by ipanova@redhat.com over 3 years ago

  • Status changed from NEW to CLOSED - DUPLICATE

Also available in: Atom PDF