fix delay and improve async  unit test