Open trwalke opened 2 years ago
This happens because the background refresh adds jitter between -5 min and + 5 min, so the test can potentially wait up to 5 min for the background refresh to occur. This needs to be refactored so that tests can control the jitter interval.
@trwalke @bgavrilMS is this still the case?
The test that seems to fail very frequently is ATS_NonExpired_NeedsRefresh_AADUnavailableResponse_Async
error: Assert.IsTrue failed. Background refresh 2 did not execute.
Stack Trace: at Microsoft.Identity.Test.Unit.PublicApiTests.RefreshInTests.ATS_NonExpired_NeedsRefresh_AADUnavailableResponse_Async() in \tests\Microsoft.Identity.Test.Unit\PublicApiTests\RefreshInTests.cs:line 153 at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ThreadOperations.ExecuteWithAbortSafety(Action action)
Logs Output: Debug Trace: Framework: .NET Core Test started ATS_NonExpired_NeedsRefresh_AADUnavailableResponse_Async
Repro The test seems to fail randomly but does occur about 2-3 times a week during nightly builds.