Project

Profile

Help

Refactor #132

closed

Ensure all tests can be run independantly

Added by bmbouter almost 10 years ago. Updated over 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The Problem
Many tests rely on the state leftover from other tests. This causes some tests to pass when run with ./run-tests.py but fail when run individually. All tests should be able to run individually in both platform and all plugins.

Which tests need fixing?
Install nosepipe and modify pulp.devel.test_runner.run_tests to include the --with-process-isolation option. Run the tests on platform or your plugins using ./run-tests.py. They will take a long time. Look at the output for the failed tests; those are the ones that are not independent.

Expected problems

  • There will likely be many non-initialized database errors from test code attempting to use the database but relying on a previous test to configuring it. This can be solved by having run_tests() connect to the database once and for all and removing calls to initialize() throughout the test code. A consistent base class used by all unit tests is also an option.

Related issues

Related to Pulp - Issue #1554: Tests for pulp.server.managers.content.query cannot be run independentlyCLOSED - WONTFIXActions
Related to Pulp - Issue #1553: Tests for pulp.server.managers.content.orphan cannot be run independentlyCLOSED - WONTFIXActions
Has duplicate RPM Support - Refactor #116: The tests for pulp_rpm.plugins.importers.yum.sync cannot be run independentlyCLOSED - DUPLICATE

Actions
Blocks Pulp - Task #919: Add Jenkins job to ensure all tests pass independantlyCLOSED - WONTFIX

Actions

Also available in: Atom PDF