pulp_2_tests.tests.rpm.cli.test_process_recycling¶
Location: Pulp 2 Tests → Tests → pulp_2_tests.tests.rpm.cli.test_process_recycling
Test Pulp’s ability to recycle processes.
-
class
pulp_2_tests.tests.rpm.cli.test_process_recycling.
MaxTasksPerChildTestCase
(methodName='runTest')¶ Bases:
unittest.case.TestCase
Test Pulp’s handling of its
PULP_MAX_TASKS_PER_CHILD
setting.The
PULP_MAX_TASKS_PER_CHILD
setting controls how many tasks a worker process executes before being destroyed. Setting this option to a low value, like 2, ensures that processes don’t have a chance to consume large amounts of memory.Test this feature by doing the following:
- Use
ps
to verify that no Pulp worker processes have the--maxtasksperchild
option set. - Set
PULP_MAX_TASKS_PER_CHILD
and restart Pulp. Useps
to verify that all Pulp worker processes were invoked with the--maxtasksperchild
option. - Execute a sync and publish. No errors should be reported.
- Unset the
PULP_MAX_TASKS_PER_CHILD
option and restart Pulp. Useps
to verify that no Pulp worker processes have the--maxtasksperchild
option set.
For more information, see Pulp #2172.
-
test_all
()¶ Test Pulp’s handling of its
PULP_MAX_TASKS_PER_CHILD
setting.
- Use
-
pulp_2_tests.tests.rpm.cli.test_process_recycling.
get_pulp_worker_procs
(cfg)¶ Use
ps aux
to get information about each Pulp worker process.Parameters: cfg – Information about the Pulp deployment being targeted. Returns: An iterable of strings, one per line of matching output.
-
pulp_2_tests.tests.rpm.cli.test_process_recycling.
setUpModule
()¶ Conditionally skip this module, and execute
pulp-admin login
.