Added 'sleep' to avoid 'testMapWithErrorInFuncAndThreadPoolScheduler' fails

Hi, due to my mistake, `testMapWithErrorInFuncAndThreadPoolScheduler` may fail in some situation. Sorry for that. I fixed it in this PR.