Fix a few racing conditions in the unit tests.
Fix a few racing conditions in the unit tests.

FooBarWidget/daemon_controller,FooBarWidget/daemon_controller,beni55/daemon_controller,livingsocial/daemon_controller,FooBarWidget/daemon_controller