Skip to content
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

Fix test #1748

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/Polly.Specs/Caching/AbsoluteTtlSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class AbsoluteTtlSpecs : IDisposable
[Fact]
public void Should_be_able_to_configure_for_near_future_time()
{
Action configure = () => new AbsoluteTtl(DateTime.Today.AddDays(1));
Action configure = () => new AbsoluteTtl(DateTimeOffset.UtcNow.Date.AddDays(1));

configure.Should().NotThrow();
}
Expand Down Expand Up @@ -38,8 +38,8 @@ public void Should_return_zero_ttl_if_configured_to_expire_in_past()
[Fact]
public void Should_return_timespan_reflecting_time_until_expiry()
{
DateTime today = DateTime.Today;
DateTime tomorrow = today.AddDays(1);
DateTimeOffset today = DateTimeOffset.UtcNow.Date;
DateTimeOffset tomorrow = today.AddDays(1);

AbsoluteTtl ttlStrategy = new AbsoluteTtl(tomorrow);

Expand Down