pulp_smash.tests.pulp2.rpm.cli.test_process_recycling

Location: Pulp SmashAPI Documentationpulp_smash.tests.pulp2.rpm.cli.test_process_recycling

Test Pulp’s ability to recycle processes.

class pulp_smash.tests.pulp2.rpm.cli.test_process_recycling.MaxTasksPerChildTestCase(methodName='runTest')

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:

  1. Use ps to verify that no Pulp worker processes have the --maxtasksperchild option set.
  2. Set PULP_MAX_TASKS_PER_CHILD and restart Pulp. Use ps to verify that all Pulp worker processes were invoked with the --maxtasksperchild option.
  3. Execute a sync and publish. No errors should be reported.
  4. Unset the PULP_MAX_TASKS_PER_CHILD option and restart Pulp. Use ps 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.

pulp_smash.tests.pulp2.rpm.cli.test_process_recycling.get_pulp_worker_procs(cfg)

Use ps aux to get information about each Pulp worker process.

Parameters:cfg (pulp_smash.config.PulpSmashConfig) – Information about the Pulp deployment being targeted.
Returns:An iterable of strings, one per line of matching output.
pulp_smash.tests.pulp2.rpm.cli.test_process_recycling.setUpModule()

Conditionally skip this module, and execute pulp-admin login.