Fix unittest of things manager to wait a certain time to discover resources