712 references to FromSeconds
AnalyzerRunner (1)
aspire (2)
Aspire.Azure.AI.OpenAI.Tests (1)
Aspire.Cli.Tests (12)
Aspire.Dashboard (15)
Aspire.Dashboard.Components.Tests (5)
Aspire.Dashboard.Tests (3)
Aspire.EndToEnd.Tests (9)
Aspire.Hosting (18)
Aspire.Hosting.Azure (2)
Aspire.Hosting.Azure.Tests (12)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.Docker.Tests (1)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Garnet.Tests (4)
Aspire.Hosting.Kafka.Tests (3)
Aspire.Hosting.MongoDB.Tests (4)
Aspire.Hosting.MySql.Tests (7)
MySqlFunctionalTests.cs (7)
71.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() })
125.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
302.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() })
389.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() })
473.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(1), ShouldHandle = new PredicateBuilder().Handle<MySqlException>() })
617.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
691.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Oracle.Tests (3)
Aspire.Hosting.PostgreSQL.Tests (5)
Aspire.Hosting.Python.Tests (1)
Aspire.Hosting.Qdrant.Tests (2)
Aspire.Hosting.Redis (1)
Aspire.Hosting.Redis.Tests (4)
Aspire.Hosting.SqlServer.Tests (5)
SqlServerFunctionalTests.cs (5)
67.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
132.AddRetry(new() { MaxRetryAttempts = int.MaxValue, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
340.AddRetry(new() { MaxRetryAttempts = 10, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
406.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
459.AddRetry(new() { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Linear, Delay = TimeSpan.FromSeconds(2) })
Aspire.Hosting.Testing.Tests (5)
Aspire.Hosting.Tests (35)
Aspire.Hosting.Valkey (1)
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp.Tests (4)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (11)
Aspire.NATS.Net.Tests (1)
Aspire.Playground.Tests (4)
Aspire.Pomelo.EntityFrameworkCore.MySql (2)
Aspire.RabbitMQ.Client (1)
Aspire.RabbitMQ.Client.Tests (1)
Aspire.RabbitMQ.Client.v7.Tests (1)
Aspire.StackExchange.Redis (1)
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
Aspire.StackExchange.Redis.Tests (1)
Aspire.Templates.Tests (12)
AzureSearch.ApiService (1)
Binding.ReliableSession.IntegrationTests (2)
Client.TypedClient.IntegrationTests (2)
Consumer (1)
Contract.Service.IntegrationTests (3)
CosmosEndToEnd.ApiService (1)
CustomResources.AppHost (1)
dotnet-svcutil-lib (3)
GetDocument.Insider (1)
HealthChecksSandbox.AppHost (1)
InMemory.FunctionalTests (81)
Http2\Http2TimeoutTests.cs (29)
218AdvanceTime(TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) +
219limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5));
353limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
375AdvanceTime(TimeSpan.FromSeconds((_bytesReceived + _helloWorldBytes.Length) / limits.MinResponseDataRate.BytesPerSecond) +
376limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5));
406limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
427var timeToWriteMaxData = TimeSpan.FromSeconds((_bytesReceived + _maxData.Length) / limits.MinResponseDataRate.BytesPerSecond) +
428limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5);
461limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
484AdvanceTime(TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) +
485limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5));
513limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
535var timeToWriteMaxData = TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) +
536limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5);
567limits.MinResponseDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
601var timeToWriteMaxData = TimeSpan.FromSeconds(_bytesReceived / limits.MinResponseDataRate.BytesPerSecond) +
602limits.MinResponseDataRate.GracePeriod + Heartbeat.Interval - TimeSpan.FromSeconds(.5);
633limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
680limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
700var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5);
731limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
761var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond);
767timeToReadMaxData -= TimeSpan.FromSeconds(.5);
798limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
835var timeToReadMaxData = TimeSpan.FromSeconds(_maxData.Length / limits.MinRequestBodyDataRate.BytesPerSecond) - TimeSpan.FromSeconds(.5);
866limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
923limits.MinRequestBodyDataRate = new MinDataRate(480, TimeSpan.FromSeconds(2.5));
Microsoft.Arcade.Common (1)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Microsoft.AspNetCore.Http.Tests (2)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.Session.Tests (2)
Microsoft.Build (2)
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Utilities.Core (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Microsoft.CodeAnalysis.Features (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.SignCheckTask (1)
Microsoft.Extensions.AI.Abstractions.Tests (30)
SpeechToText\SpeechToTextResponseUpdateExtensionsTests.cs (12)
49new("human, ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(10), EndTime = TimeSpan.FromSeconds(20) },
50new("How ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(22), EndTime = TimeSpan.FromSeconds(23) },
51new("are ") { ModelId = "model123", StartTime = TimeSpan.FromSeconds(23), EndTime = TimeSpan.FromSeconds(24) },
52new([new TextContent("You?")]) { ModelId = "model123", StartTime = TimeSpan.FromSeconds(24), EndTime = TimeSpan.FromSeconds(25), AdditionalProperties = new() { ["c"] = "d" } },
53new() { ResponseId = "someResponse", ModelId = "model123", StartTime = TimeSpan.FromSeconds(25), EndTime = TimeSpan.FromSeconds(35) },
63Assert.Equal(TimeSpan.FromSeconds(10), response.StartTime);
64Assert.Equal(TimeSpan.FromSeconds(35), response.EndTime);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (4)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.StackExchangeRedis (4)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (32)
TimeExpirationAsyncTests.cs (16)
62await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1)));
69await Task.Delay(TimeSpan.FromSeconds(0.5));
83await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25)));
128await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1)));
135await Task.Delay(TimeSpan.FromSeconds(0.5));
148await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25)));
190await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1)));
195await Task.Delay(TimeSpan.FromSeconds(3.5));
208await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25)));
221await cache.SetAsync(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1)));
228await Task.Delay(TimeSpan.FromSeconds(0.5));
234await Task.Delay(TimeSpan.FromSeconds(3));
247.SetSlidingExpiration(TimeSpan.FromSeconds(1))
248.SetAbsoluteExpiration(TimeSpan.FromSeconds(3)));
256await Task.Delay(TimeSpan.FromSeconds(0.5));
265await Task.Delay(TimeSpan.FromSeconds(0.5));
TimeExpirationTests.cs (16)
45cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1)));
52Thread.Sleep(TimeSpan.FromSeconds(0.5));
66cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25)));
112cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(1)));
119Thread.Sleep(TimeSpan.FromSeconds(0.5));
132cache.Set(key, value, new DistributedCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromSeconds(0.25)));
175cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1)));
180Thread.Sleep(TimeSpan.FromSeconds(3.5));
193cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(0.25)));
206cache.Set(key, value, new DistributedCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromSeconds(1)));
213Thread.Sleep(TimeSpan.FromSeconds(0.5));
219Thread.Sleep(TimeSpan.FromSeconds(3));
232.SetSlidingExpiration(TimeSpan.FromSeconds(1))
233.SetAbsoluteExpiration(TimeSpan.FromSeconds(3)));
241Thread.Sleep(TimeSpan.FromSeconds(0.5));
250Thread.Sleep(TimeSpan.FromSeconds(0.5));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (54)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Diagnostics.Tests (22)
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Http.Resilience.Tests (35)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.ServiceDiscovery (3)
Microsoft.Extensions.ServiceDiscovery.Dns (5)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (11)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Microsoft.Extensions.TimeProvider.Testing.Tests (2)
Microsoft.ML.AutoML (1)
Microsoft.ML.AutoML.Interactive (1)
Microsoft.ML.AutoML.Tests (3)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Maml (1)
Microsoft.VisualStudio.LanguageServices (4)
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
Mongo.AppHost (1)
PortableTask (1)
PresentationCore (21)
PresentationFramework (4)
PresentationFramework.Aero (27)
PresentationFramework.Aero2 (27)
Producer (2)
Roslyn.VisualStudio.DiagnosticsWindow (2)
RunTests (1)
ServiceBusWorker (1)
Stress.ApiService (1)
Stress.AppHost (1)
Stress.TelemetryService (1)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (1)
System.Formats.Cbor (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
UnitTests.Common (9)
VBCSCompiler (3)
VBCSCompiler.UnitTests (7)