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.TestCaseTest Pulp’s handling of its
PULP_MAX_TASKS_PER_CHILDsetting.The
PULP_MAX_TASKS_PER_CHILDsetting 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
psto verify that no Pulp worker processes have the--maxtasksperchildoption set. - Set
PULP_MAX_TASKS_PER_CHILDand restart Pulp. Usepsto verify that all Pulp worker processes were invoked with the--maxtasksperchildoption. - Execute a sync and publish. No errors should be reported.
- Unset the
PULP_MAX_TASKS_PER_CHILDoption and restart Pulp. Usepsto verify that no Pulp worker processes have the--maxtasksperchildoption set.
For more information, see Pulp #2172.
-
test_all()¶ Test Pulp’s handling of its
PULP_MAX_TASKS_PER_CHILDsetting.
- Use
-
pulp_2_tests.tests.rpm.cli.test_process_recycling.get_pulp_worker_procs(cfg)¶ Use
ps auxto 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.