test: replace final fixed-delay oracles
This commit is contained in:
parent
ad7ebe9425
commit
79a4489e03
6 changed files with 101 additions and 21 deletions
|
|
@ -15,7 +15,8 @@ internal static class BakePublicationGuardContract
|
|||
|
||||
internal static async ValueTask<PublicationLease> AcquireAsync(
|
||||
string outputPath,
|
||||
CancellationToken cancellationToken = default)
|
||||
CancellationToken cancellationToken = default,
|
||||
Action? contentionObserved = null)
|
||||
{
|
||||
string lockPath = BakePublicationGuardPaths.GetPublishLockPath(
|
||||
outputPath);
|
||||
|
|
@ -39,6 +40,7 @@ internal static class BakePublicationGuardContract
|
|||
}
|
||||
catch (IOException)
|
||||
{
|
||||
contentionObserved?.Invoke();
|
||||
await Task.Delay(RetryDelay, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue