Add unit tests
Remove sleep before retry