Skip to content

Commit

Permalink
Increase polling time for deleted/purged keys (#20504)
Browse files Browse the repository at this point in the history
  • Loading branch information
heaths authored Apr 19, 2021
1 parent ef149fc commit ccb77de
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ protected Task WaitForDeletedKey(string name, TimeSpan? delay = null)

using (Recording.DisableRecording())
{
delay ??= PollingInterval;
delay ??= TimeSpan.FromSeconds(5);
return TestRetryHelper.RetryAsync(async () => await Client.GetDeletedKeyAsync(name), delay: delay.Value);
}
}

protected Task WaitForPurgedKey(string name)
protected Task WaitForPurgedKey(string name, TimeSpan? delay = null)
{
if (Mode == RecordedTestMode.Playback)
{
Expand All @@ -274,6 +274,7 @@ protected Task WaitForPurgedKey(string name)

using (Recording.DisableRecording())
{
delay ??= TimeSpan.FromSeconds(5);
return TestRetryHelper.RetryAsync(async () => {
try
{
Expand All @@ -284,7 +285,7 @@ protected Task WaitForPurgedKey(string name)
{
return (Response)null;
}
}, delay: PollingInterval);
}, delay: delay.Value);
}
}

Expand Down

0 comments on commit ccb77de

Please sign in to comment.