ooici/pyon — pull request #244 by jamie-cyber1 (2013-02-07 23:32:15+00:00)
Title: Process leak

### Process Leak Plugin

__Motivation__
We have found integration tests with improper cleanups or failures leaving around run away processes. The especially causes headaches in the launched systems where they tend to fail in between couch cleanups and PD would try to resurrect them over and over again.

This plug in will attempt to detect run away processes launched via pd on the server side and kill them in between the tests. It also prints a report for post analysis.

__Usage__
```
bin/nosetests --with-pycc --with-processleak --list-procs -a INT,group=as -v
```

--list-procs optional to see all new processes generated by the test

It is intended to work against a live process dispatcher service during the entire nose run. Therefore, it works in conjunction with --with-pycc plugin or a light CEI or full launch. Use greenleak plugin instead for leak detection in vanilla non pycc mode.

__Sample Run Output__
```
bin/nosetests --with-processleak --list-procs -a INT,group=as -v --with-pycc

Process leak report
Test Leaked Processes
========================================================================== =======================================================================
TestVisualizationServiceIntegration.test_google_dt_overview_visualization
('ingestion_worker_process0f01c088a0314c139791f9ac349d402f', 'RUNNING')
('processde49df6caa0c402cbe870ede3455f111', 'TERMINATED')

TestVisualizationServiceIntegration.test_mpl_graphs_overview_visualization
('ingestion_worker_processbd5f19de9c6441ad90d324e15910c204', 'RUNNING')
('processa639e30cea604413b756668a83503020', 'TERMINATED')

TestVisualizationServiceIntegration.test_realtime_visualization
('ingestion_worker_process1c2b701ace304125b5bdc7f93c25ad4b', 'RUNNING')
('process11e5bc75b99f422686e93ab7e1fd0866', 'TERMINATED')
('ingestion_worker_process08f46282c4c64404bf6bd86ee506eefa', 'RUNNING')
('google_dt_transform4e0c9b57c636451e8d349381c577b18a', 'RUNNING')

----------------------------------------------------------------------
```