Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pulp_rpm/tests/functional/api/test_pulpimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ def test_distribution_tree_import(
assert trees.count == 1


# Runs orphan cleanup to create a content-free zone; conflicts with parallel tests
@pytest.mark.serial
def test_clean_import(
rpm_repository_api,
import_export_repositories,
Expand Down Expand Up @@ -286,6 +288,8 @@ def test_clean_import(
assert rpm_repository_api.list().count == existing_repos


# Runs orphan cleanup to create a content-free zone; conflicts with parallel tests
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it's not the orphan-cleanup that causes a race - it's the window between 369-404 where som eother test creating a repo will cause the assert to fail. Let's change the comment to be more-correct to avoid confusing Future Us

@pytest.mark.serial
def test_create_missing_repos(
init_and_sync,
rpm_rpmremote_api,
Expand Down
6 changes: 6 additions & 0 deletions pulp_rpm/tests/functional/api/test_repo_sizes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import json
import subprocess

import pytest

from pulp_rpm.tests.functional.constants import (
RPM_UNSIGNED_FIXTURE_URL,
RPM_UNSIGNED_FIXTURE_SIZE,
Expand All @@ -9,6 +11,8 @@
)


# Asserts exact disk-size; parallel immediate syncs share artifacts and inflate it
@pytest.mark.serial
def test_repo_size(init_and_sync, delete_orphans_pre, monitor_task, pulpcore_bindings):
"""Test that RPM repos correctly report their on-disk artifact sizes."""
monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task)
Expand Down Expand Up @@ -39,6 +43,8 @@ def test_repo_size(init_and_sync, delete_orphans_pre, monitor_task, pulpcore_bin
assert report["on-demand-size"] == 0


# Asserts exact disk-size; parallel immediate syncs share artifacts and inflate it
@pytest.mark.serial
def test_kickstart_repo_size(init_and_sync, delete_orphans_pre, monitor_task, pulpcore_bindings):
"""Test that kickstart RPM repos correctly report their on-disk artifact sizes."""
monitor_task(pulpcore_bindings.OrphansCleanupApi.cleanup({"orphan_protection_time": 0}).task)
Expand Down
Loading