Fixed a unit test.
trq-2404 Don't get pid list on every iteration, just get once and reuse.
Fixed unit tests.