Having a test sleeping for 10 seconds is not good. Can't you find a different way to test this scenario?