CC-584: Minimizing the risk of race conditions in unit tests

https://jira.zenoss.com/browse/CC-584