The Wayback Machine - https://web.archive.org/web/20210728164124/https://github.com/dotnet/aspnetcore/issues/34807
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

Mock System Clock for FileLoggerProcessor Tests #34807

Open
wtgodbe opened this issue Jul 28, 2021 · 1 comment
Open

Mock System Clock for FileLoggerProcessor Tests #34807

wtgodbe opened this issue Jul 28, 2021 · 1 comment

Comments

@wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Jul 28, 2021

Right now these tests don't run if it's close to midnight, so that they don't have to account for the file number wrapping back to 0 in the middle of test execution. This also means we don't have any tests that verify that file names/numbers behave correctly on the new day boundary. We should mock the system clock like SignalR does so we can test his behavior: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/common/Shared/ISystemClock.cs

var now = DateTimeOffset.Now;
if (now.Hour == 23)
{
// Don't bother trying to run this test when it's almost midnight.
return;
}

@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Jul 28, 2021

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment