pulp_smash.tests.rpm.cli.test_process_recycling

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

Test Pulp’s ability to recycle processes.

class pulp_smash.tests.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 see how Pulp worker processes were invoked. None should have the --maxtasksperchild option set.
  2. Set PULP_MAX_TASKS_PER_CHILD and restart Pulp. Use ps to see how Pulp worker processes were invoked. Each should have the --maxtasksperchild option set as appropriate.
  3. Execute a sync and publish. No errors should be reported.
  4. Reset the PULP_MAX_TASKS_PER_CHILD option and restart Pulp. ps to see how Pulp worker processes were invoked. Each should have the --maxtasksperchild option set as appropriate.

For more information, see Pulp #2172.

test_all()

Test Pulp’s handling of its PULP_MAX_TASKS_PER_CHILD setting.

pulp_smash.tests.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.rpm.cli.test_process_recycling.restart_pulp(cfg)

Restart all of Pulp’s services.

Unlike pulp_smash.utils.reset_pulp(), do not reset the state of any of Pulp’s services.

Parameters:cfg (pulp_smash.config.PulpSmashConfig) – Information about the Pulp deployment being targeted.
pulp_smash.tests.rpm.cli.test_process_recycling.setUpModule()

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