use WaitForDaemon in tests