diff --git a/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs b/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs index 2b70969bf25..a32568df99e 100644 --- a/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs +++ b/tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs @@ -343,7 +343,7 @@ public async Task AllocatedPortsAssignedAfterHookRuns() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var appModel = await tcs.Task.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); @@ -381,7 +381,7 @@ public async Task TestServicesWithMultipleReplicas() var logger = app.Services.GetRequiredService>(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); logger.LogInformation("Make sure services A and C are running"); using var clientA = app.CreateHttpClient(testProgram.ServiceABuilder.Resource.Name, "http"); @@ -435,7 +435,7 @@ public async Task VerifyContainerArgs() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); var list = await s.ListAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); @@ -488,7 +488,7 @@ public async Task VerifyContainerCreateFile() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); var list = await s.ListAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); @@ -537,7 +537,7 @@ public async Task VerifyContainerStopStartWorks() var orchestrator = app.Services.GetRequiredService(); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestLongTimeout); var token = cts.Token; @@ -580,7 +580,7 @@ public async Task VerifyExecutableStopStartWorks() var orchestrator = app.Services.GetRequiredService(); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var executablePattern = $"{testName}-servicea-{ReplicaIdRegex}-{suffix}"; var serviceA = await KubernetesHelper.GetResourceByNameMatchAsync(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Running).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); @@ -622,7 +622,7 @@ public async Task SpecifyingEnvPortInEndpointFlowsToEnv() var kubernetes = app.Services.GetRequiredService(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; var redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync(kubernetes, $"{testName}-redis-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); @@ -677,7 +677,7 @@ public async Task StartAsync_DashboardAuthConfig_PassedToDashboardProcess(string var kubernetes = app.Services.GetRequiredService(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; var aspireDashboard = await KubernetesHelper.GetResourceByNameMatchAsync(kubernetes, $"aspire-dashboard-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); @@ -717,7 +717,7 @@ public async Task StartAsync_UnsecuredAllowAnonymous_PassedToDashboardProcess() var kubernetes = app.Services.GetRequiredService(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; var aspireDashboard = await KubernetesHelper.GetResourceByNameMatchAsync(kubernetes, $"aspire-dashboard-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); @@ -748,7 +748,7 @@ public async Task VerifyDockerWithEntrypointWorks() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); @@ -777,7 +777,7 @@ public async Task VerifyDockerWithBindMountWorksWithAbsolutePaths() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); @@ -806,7 +806,7 @@ public async Task VerifyDockerWithBindMountWorksWithRelativePaths() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); @@ -836,7 +836,7 @@ public async Task VerifyDockerWithVolumeWorksWithName() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); @@ -862,7 +862,7 @@ public async Task KubernetesHasResourceNameForContainersAndExes() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var s = app.Services.GetRequiredService(); @@ -923,7 +923,7 @@ public async Task ReplicasAndProxylessEndpointThrows() await using var app = testProgram.Build(); - var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout)); + var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; Assert.Equal($"Resource '{testName}-servicea-{suffix}' uses multiple replicas and a proxy-less endpoint 'http'. These features do not work together.", ex.Message); } @@ -942,7 +942,7 @@ public async Task ProxylessEndpointWithoutPortThrows() await using var app = testProgram.Build(); - var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout)); + var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); var suffix = app.Services.GetRequiredService>().Value.ResourceNameSuffix; Assert.Equal($"Service '{testName}-servicea-{suffix}' needs to specify a port for endpoint 'http' since it isn't using a proxy.", ex.Message); } @@ -964,7 +964,7 @@ public async Task ProxylessEndpointWorks() SetupXUnitLogging(testProgram.AppBuilder.Services); await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); var client = app.CreateHttpClientWithResilience($"{testName}-servicea", "http"); @@ -1007,7 +1007,7 @@ public async Task ProxylessAndProxiedEndpointBothWorkOnSameResource() await using var app = testProgram.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); var token = cts.Token; @@ -1076,7 +1076,7 @@ public async Task ProxylessContainerCanBeReferenced() .WithReference(redisNoPort); using var app = builder.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); // Wait for the application to be ready await app.WaitForTextAsync("Application started.").DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); @@ -1126,7 +1126,7 @@ public async Task WithEndpointProxySupportDisablesProxies() .WithReference(redisNoPort); using var app = builder.Build(); - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); // Wait for the application to be ready await app.WaitForTextAsync("Application started.").DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); @@ -1173,7 +1173,7 @@ public async Task ProxylessContainerWithoutPortThrows() using var app = builder.Build(); - var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout)); + var ex = await Assert.ThrowsAsync(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); Assert.Equal($"The endpoint 'tcp' for container resource '{testName}-redis' must specify the TargetPort value", ex.Message); } @@ -1194,7 +1194,7 @@ public async Task AfterResourcesCreatedLifecycleHookWorks() var kubernetesLifecycle = (KubernetesTestLifecycleHook)lifecycles.Where(l => l.GetType() == typeof(KubernetesTestLifecycleHook)).First(); kubernetesLifecycle.KubernetesService = s; - await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); + await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); await kubernetesLifecycle.HooksCompleted.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); }