New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry test with delay #2277
Comments
@yadavan88 I think you discovered a bug, the source of the withRetry that you are calling: As you see, there's no use of the passed in delay to sleep to wait. On thing to note though, withRetry will call the passed in code 2 times when it fails the first time, so it may not be the one that you desired, perhaps something like the following is nearer to what you are after:
I'll submit a PR to fix the bug you discovered, at the same time hopefully the above example can help you move forward. Cheers. |
@yadavan88 I think it is a good idea to have overloaded withRetry/withRetries functions that takes a maximum count, that shouldn't be hard, I'll try working out a PR targeting for the upcoming 3.3 and see if @bvenners thinks it is a good idea. |
Thank you @cheeseng :) |
@yadavan88 Fyi I submitted the PR to add withRetries here: |
Hi,
I am trying to retry a failing test multiple times. I want to set a delay of a few seconds before the next retry. I thought I could use the
withRetry
method by passing the delay time asSpan
. However, it doesn't seem to work as I expected.Here is a sample code:
I wanted to retry the same test but after a delay of 2 seconds. Is this not the correct way?
The text was updated successfully, but these errors were encountered: