public void It_applies_the_retryAfter_timeout_within_until() { var toTry = new CountTriesAction(options); var retryAfter = TimeSpan.FromMilliseconds(20); var until = new AlwaysThrowsPredicateQuery<TestException>(options.Timeout, retryAfter); Assert.Throws<TestException>(() => retryUntilTimeoutRobustWrapper.TryUntil(toTry, until, options.Timeout, options.RetryInterval)); Assert.That(toTry.Tries, Is.GreaterThan(1)); Assert.That(toTry.Tries, Is.LessThan(12)); }
public void It_applies_the_retryAfter_timeout_within_until() { var toTry = new CountTriesAction(options); var retryAfter = TimeSpan.FromMilliseconds(20); var until = new AlwaysThrowsPredicateQuery<TestException>(TimeSpan.Zero, retryAfter); Assert.Throws<TestException>(() => _retryUntilTimeoutTimingStrategy.TryUntil(toTry, until, new Options{Timeout = options.Timeout})); Assert.That(toTry.Tries, Is.GreaterThan(1)); Assert.That(toTry.Tries, Is.LessThan(12)); }