Project

Profile

Help

Issue #1553

closed

Tests for pulp.server.managers.content.orphan cannot be run independently

Added by rbarlow about 7 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The tests for pulp.server.managers.content.orphan fail when run independently:

$ time nosetests -sx server/test/unit/server/managers/content/test_orphan.py
......F
======================================================================
FAIL: test_delete_one_orphan_using_generators (unit.server.managers.content.test_orphan.OrphanManagerGeneratorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vagrant/devel/pulp/server/test/unit/server/managers/content/test_orphan.py", line 212, in test_delete_one_orphan_using_generators
    self.orphan_manager.delete_all_orphans()
  File "/home/vagrant/devel/pulp/server/pulp/server/managers/content/orphan.py", line 172, in delete_all_orphans
    for content_type_id in plugin_api.list_unit_models():
  File "/home/vagrant/devel/pulp/server/pulp/plugins/loader/api.py", line 96, in list_unit_models
    assert _is_initialized()
AssertionError: 
-------------------- >> begin captured logging << --------------------
pulp.plugins.types.database: INFO: Updating the database with types [phony_type_1, phony_type_2]
pulp.plugins.types.database: DEBUG: Ensuring index [name] (unique: True) on type definition [phony_type_1]
pulp.plugins.types.database: DEBUG: Index [name_1] created on type definition [phony_type_1]
pulp.plugins.types.database: DEBUG: Ensuring index [name] (unique: True) on type definition [phony_type_2]
pulp.plugins.types.database: DEBUG: Index [name_1] created on type definition [phony_type_2]
pulp.server.managers.content.orphan: DEBUG: Deleting orphaned file: /tmp/content_orphan_manager_unittests-zpe9Fl/HxqhX
pulp.plugins.types.database: INFO: Purging the database of all content type definitions and collections
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 7 tests in 0.916s

FAILED (failures=1)

real    0m2.331s
user    0m1.377s
sys    0m0.202s

However, they pass when run with the other manager tests:

$ time nosetests -sx server/test/unit/server/managers/
..............................................................................................................................................................................................................................................................................................................................................................................................................S....S......................................................................................................................
----------------------------------------------------------------------
Ran 522 tests in 30.846s

OK (SKIP=2)

real    0m33.595s
user    0m25.181s
sys    0m3.595s

Related issues

Related to Pulp - Refactor #132: Ensure all tests can be run independantlyCLOSED - WONTFIX

Actions
Actions #1

Updated by bmbouter about 7 years ago

  • Related to Refactor #132: Ensure all tests can be run independantly added
Actions #2

Updated by jortel@redhat.com about 7 years ago

  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes
Actions #3

Updated by bmbouter almost 4 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #4

Updated by bmbouter almost 4 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #5

Updated by bmbouter almost 4 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF