Test retry logic