173 references to Advance
Aspire.Hosting.Tests (2)
Health\ResourceHealthCheckServiceTests.cs (2)
162timeProvider.Advance(TimeSpan.FromSeconds(5)); 165timeProvider.Advance(TimeSpan.FromSeconds(5));
InMemory.FunctionalTests (14)
Http2\Http2TestBase.cs (2)
1381_serviceContext.FakeTimeProvider.Advance(timeSpan); 1402timeProvider.Advance(timeProvider.GetElapsedTime(timeProvider.GetTimestamp(), endTime));
KeepAliveTimeoutTests.cs (3)
119testContext.FakeTimeProvider.Advance(_shortDelay); 159testContext.FakeTimeProvider.Advance(_shortDelay); 234testContext.FakeTimeProvider.Advance(_shortDelay);
RequestBodyTimeoutTests.cs (2)
77serviceContext.FakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 203serviceContext.FakeTimeProvider.Advance(TimeSpan.FromSeconds(1));
RequestHeadersTimeoutTests.cs (1)
138testContext.FakeTimeProvider.Advance(ShortDelay);
RequestTests.cs (1)
1666serviceContext.FakeTimeProvider.Advance(TimeSpan.FromSeconds(5));
ResponseDrainingTests.cs (2)
61testContext.FakeTimeProvider.Advance(TimeSpan.FromSeconds(1)); 70testContext.FakeTimeProvider.Advance(TimeSpan.FromSeconds(1));
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (3)
211timeProvider.Advance(Heartbeat.Interval); 215timeProvider.Advance(timeProvider.GetElapsedTime(timeProvider.GetTimestamp(), endTime)); 221_fakeTimeProvider.Advance(timeSpan);
Microsoft.AspNetCore.Authentication.Test (35)
CertificateTests.cs (1)
763timeProvider.Advance(TimeSpan.FromMinutes(31));
CookieTests.cs (34)
208_timeProvider.Advance(TimeSpan.FromDays(60)); 243_timeProvider.Advance(TimeSpan.FromDays(60)); 451_timeProvider.Advance(TimeSpan.FromMinutes(7)); 455_timeProvider.Advance(TimeSpan.FromMinutes(7)); 485_timeProvider.Advance(TimeSpan.FromMinutes(3)); 489_timeProvider.Advance(TimeSpan.FromMinutes(3)); 523_timeProvider.Advance(TimeSpan.FromMinutes(11)); 623_timeProvider.Advance(TimeSpan.FromMinutes(5)); 629_timeProvider.Advance(TimeSpan.FromMinutes(6)); 635_timeProvider.Advance(TimeSpan.FromMinutes(5)); 744_timeProvider.Advance(TimeSpan.FromMinutes(5)); 750_timeProvider.Advance(TimeSpan.FromMinutes(6)); 756_timeProvider.Advance(TimeSpan.FromMinutes(11)); 800_timeProvider.Advance(TimeSpan.FromMinutes(5)); 806_timeProvider.Advance(TimeSpan.FromMinutes(6)); 812_timeProvider.Advance(TimeSpan.FromMinutes(11)); 859_timeProvider.Advance(TimeSpan.FromMinutes(1)); 865_timeProvider.Advance(TimeSpan.FromMinutes(1)); 871_timeProvider.Advance(TimeSpan.FromMinutes(9)); 905_timeProvider.Advance(TimeSpan.FromMinutes(5)); 911_timeProvider.Advance(TimeSpan.FromMinutes(6)); 917_timeProvider.Advance(TimeSpan.FromMinutes(5)); 963_timeProvider.Advance(TimeSpan.FromMinutes(1)); 969_timeProvider.Advance(TimeSpan.FromMinutes(2)); 1004_timeProvider.Advance(TimeSpan.FromMinutes(3)); 1010_timeProvider.Advance(TimeSpan.FromMinutes(3)); 1034_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1040_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1047_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1080_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1086_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1093_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1128_timeProvider.Advance(TimeSpan.FromMinutes(4)); 1134_timeProvider.Advance(TimeSpan.FromMinutes(4));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Logging\AcceptanceTests.cs (2)
78fakeTimeProvider.Advance(TimeSpan.FromMilliseconds(ErrorRouteProcessingTimeMs)); 85fakeTimeProvider.Advance(TimeSpan.FromMilliseconds(SlashRouteProcessingTimeMs));
Logging\ApiRoutingController.cs (1)
32fakeTimeProvider.Advance(TimeSpan.FromMilliseconds(AcceptanceTests.ControllerProcessingTimeMs));
Microsoft.AspNetCore.Identity.FunctionalTests (4)
MapIdentityApiTests.cs (4)
193clock.Advance(TimeSpan.FromSeconds(expireTimeSpan.TotalSeconds - 1)); 198clock.Advance(TimeSpan.FromSeconds(1)); 350clock.Advance(TimeSpan.FromSeconds(expireTimeSpan.TotalSeconds - 1)); 360clock.Advance(TimeSpan.FromSeconds(1));
Microsoft.AspNetCore.Identity.InMemory.Test (8)
FunctionalTest.cs (8)
99timeProvider.Advance(TimeSpan.FromMinutes(7)); 105timeProvider.Advance(TimeSpan.FromMinutes(7)); 146timeProvider.Advance(TimeSpan.FromMinutes(10)); 152timeProvider.Advance(TimeSpan.FromMinutes(21)); 198timeProvider.Advance(TimeSpan.FromMinutes(10)); 204timeProvider.Advance(TimeSpan.FromMinutes(21)); 239timeProvider.Advance(TimeSpan.FromMinutes(30)); 275timeProvider.Advance(TimeSpan.FromMinutes(30) + TimeSpan.FromMilliseconds(1));
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheMiddlewareTests.cs (1)
398timeProvider.Advance(TimeSpan.FromSeconds(10));
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingMiddlewareTests.cs (1)
389timeProvider.Advance(TimeSpan.FromSeconds(10));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (26)
DateHeaderValueManagerTests.cs (2)
48timeProvider.Advance(TimeSpan.FromSeconds(10)); 99timeProvider.Advance(TimeSpan.FromSeconds(10));
HeartbeatTests.cs (2)
128timeProvider.Advance(TimeSpan.FromSeconds(2)); 171timeProvider.Advance(TimeSpan.FromSeconds(2));
KestrelServerTests.cs (1)
743testContext.FakeTimeProvider.Advance(TimeSpan.FromDays(1));
TimeoutControlTests.cs (21)
164_timeProvider.Advance(TimeSpan.FromSeconds(1)); 166_timeProvider.Advance(TimeSpan.FromSeconds(1)); 168_timeProvider.Advance(TimeSpan.FromSeconds(1)); 173_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 177_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 181_timeProvider.Advance(TimeSpan.FromSeconds(2)); 188_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 192_timeProvider.Advance(TimeSpan.FromSeconds(1.0)); 194_timeProvider.Advance(TimeSpan.FromSeconds(.5)); 201_timeProvider.Advance(TimeSpan.FromSeconds(1)); 220_timeProvider.Advance(TimeSpan.FromSeconds(1)); 222_timeProvider.Advance(TimeSpan.FromSeconds(1)); 230_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 234_timeProvider.Advance(TimeSpan.FromSeconds(0.25)); 238_timeProvider.Advance(TimeSpan.FromSeconds(0.5)); 246_timeProvider.Advance(TimeSpan.FromSeconds(1)); 268_timeProvider.Advance(TimeSpan.FromSeconds(3)); 470_timeProvider.Advance(TimeSpan.FromTicks(1)); 515_timeProvider.Advance(TimeSpan.FromSeconds(1)); 526_timeProvider.Advance(Heartbeat.Interval); 530_timeProvider.Advance(_timeProvider.GetElapsedTime(_timeProvider.GetTimestamp(), endTime));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (3)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (3)
211timeProvider.Advance(Heartbeat.Interval); 215timeProvider.Advance(timeProvider.GetElapsedTime(timeProvider.GetTimestamp(), endTime)); 221_fakeTimeProvider.Advance(timeSpan);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
QuicConnectionContextTests.cs (3)
530timeProvider.Advance(TimeSpan.FromSeconds(0.1)); 544timeProvider.Advance(TimeSpan.FromSeconds(QuicConnectionContext.StreamPoolExpirySeconds)); 549timeProvider.Advance(TimeSpan.FromTicks(1));
Microsoft.AspNetCore.SignalR.Tests (5)
HubConnectionHandlerTests.cs (5)
2756timeProvider.Advance(interval + TimeSpan.FromMilliseconds(1)); 2818timeProvider.Advance(timeout + TimeSpan.FromMilliseconds(1)); 2851timeProvider.Advance(timeout + TimeSpan.FromMilliseconds(1)); 2884timeProvider.Advance(timeout + TimeSpan.FromMilliseconds(1)); 2916timeProvider.Advance(timeout - TimeSpan.FromMilliseconds(1));
Microsoft.Extensions.Diagnostics.Probes.Tests (2)
TcpEndpointProbesServiceTests.cs (2)
47timeProvider.Advance(TimeSpan.FromMinutes(1)); 56timeProvider.Advance(TimeSpan.FromMinutes(1));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (17)
ResourceMonitoringServiceTests.cs (7)
259clock.Advance(TimeSpan.FromMilliseconds(1)); 260clock.Advance(TimeSpan.FromMilliseconds(1)); 339clock.Advance(TimeSpan.FromMilliseconds(TimerPeriod)); 371clock.Advance(TimeSpan.FromMilliseconds(TimerPeriod)); 466clock.Advance(TimeSpan.FromMilliseconds(TimerPeriod)); 472clock.Advance(TimeSpan.FromTicks(1)); 575clock.Advance(TimeSpan.FromMilliseconds(TimerPeriod));
Windows\WindowsContainerSnapshotProviderTests.cs (5)
237fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 243fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 250fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 300fakeClock.Advance(options.MemoryConsumptionRefreshInterval - TimeSpan.FromMilliseconds(1)); 305fakeClock.Advance(TimeSpan.FromMilliseconds(1));
Windows\WindowsSnapshotProviderTests.cs (5)
97fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 102fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 132fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 138fakeClock.Advance(TimeSpan.FromMilliseconds(1)); 146fakeClock.Advance(options.MemoryConsumptionRefreshInterval);
Microsoft.Extensions.Diagnostics.Testing.Tests (7)
Logging\FakeLogCollectorTests.cs (2)
32timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 74timeProvider.Advance(TimeSpan.FromMilliseconds(1));
Logging\FakeLoggerTests.cs (1)
261timeProvider.Advance(TimeSpan.FromMilliseconds(1));
Metrics\MetricCollectorTests.cs (4)
69timeProvider.Advance(TimeSpan.FromSeconds(1)); 114timeProvider.Advance(TimeSpan.FromSeconds(1)); 161timeProvider.Advance(TimeSpan.FromSeconds(1)); 222timeProvider.Advance(TimeSpan.FromSeconds(1));
Microsoft.Extensions.Hosting.Testing.Tests (1)
HostTerminatorServiceTests.cs (1)
42timeProvider.Advance(options.TimeToLive);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggerTest.cs (1)
913fakeTimeProvider.Advance(TimeSpan.FromMilliseconds(1000));
Microsoft.Extensions.Http.Resilience.Tests (1)
Internal\RetryAfterHelperTests.cs (1)
61timeProvider.Advance(TimeSpan.FromDays(2));
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (2)
DnsServiceEndpointResolverTests.cs (2)
26timeProvider.Advance(TimeSpan.FromSeconds(7)); 30timeProvider.Advance(TimeSpan.FromSeconds(80));
Microsoft.Extensions.TimeProvider.Testing.Tests (37)
FakeTimeProviderTests.cs (16)
49timeProvider.Advance(TimeSpan.FromMilliseconds(8)); 65timeProvider.Advance(TimeSpan.FromMilliseconds(8)); 135timeProvider.Advance(TimeSpan.FromMilliseconds(1234)); 156Assert.Throws<ArgumentOutOfRangeException>(() => timeProvider.Advance(TimeSpan.FromTicks(-1))); 180tp.Advance(TimeSpan.FromMilliseconds(999)); 183tp.Advance(TimeSpan.FromMilliseconds(1)); 207tp.Advance(TimeSpan.FromMilliseconds(999)); 210tp.Advance(TimeSpan.FromMilliseconds(1)); 241timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 271timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 293timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 313timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 332timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 408timeProvider.Advance(oneSecond); 483provider.Advance(TimeSpan.FromSeconds(taskDelay)); 486provider.Advance(TimeSpan.FromSeconds(delay));
TimerTests.cs (21)
29timeProvider.Advance(TimeSpan.FromMilliseconds(20)); 33timeProvider.Advance(TimeSpan.FromMilliseconds(1000)); 51timeProvider.Advance(TimeSpan.FromMilliseconds(20)); 55timeProvider.Advance(TimeSpan.FromMilliseconds(1000)); 73timeProvider.Advance(TimeSpan.FromMilliseconds(100)); 77timeProvider.Advance(TimeSpan.FromMilliseconds(100)); 95timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 99timeProvider.Advance(TimeSpan.FromMilliseconds(50)); 117timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 121timeProvider.Advance(TimeSpan.FromMilliseconds(10)); 125timeProvider.Advance(TimeSpan.FromMilliseconds(10)); 143fakeTimeProvider.Advance(TimeSpan.FromMilliseconds(10000)); 225timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 229timeProvider.Advance(TimeSpan.FromMilliseconds(1)); 307timeProvider.Advance(period + period + period); 332timeProvider.Advance(TimeSpan.FromMilliseconds(3)); 333timeProvider.Advance(TimeSpan.FromMilliseconds(3)); 334timeProvider.Advance(TimeSpan.FromMilliseconds(3)); 335timeProvider.Advance(TimeSpan.FromMilliseconds(2)); 367timeProvider.Advance(TimeSpan.FromTicks(1)); 384timeProvider.Advance(TimeSpan.FromSeconds(2));