275 references to TestConstants
Aspire.Hosting.Tests (275)
Backchannel\AuxiliaryBackchannelTests.cs (2)
301await app.StartAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 316await app.StopAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan);
ContainerTunnelTests.cs (5)
30await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 31await app.WaitForTextAsync("Application started.").DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 34var response = await clientA.GetAsync("/servicea/").DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 36var body = await response.Content.ReadAsStringAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 39await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout);
Dcp\DcpExecutorTests.cs (1)
1654}, TestConstants.DefaultOrchestratorTestTimeout);
DistributedApplicationTests.cs (159)
29using TestConstants = Microsoft.AspNetCore.InternalTesting.TestConstants; 71}).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 116}).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 140using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 145var resourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Waiting, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 148await orchestrator.StartResourceAsync(resourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 149await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 152await orchestrator.StopResourceAsync(resourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 153await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Finished, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 156var restartResourceTask = orchestrator.StartResourceAsync(resourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 157await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Waiting, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 160await orchestrator.StartResourceAsync(resourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 161await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 163await restartResourceTask.DefaultTimeout(TestConstants.LongTimeoutDuration); 164await startTask.DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 165await app.StopAsync(token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 185using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 191var notStartedResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.NotStarted, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 192var dependentResourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Waiting, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 212await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 213var runningResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 221var dependentResourceRunningEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 229await orchestrator.StopResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 230await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Finished, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 233await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 234await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 236await startTask.DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 237await app.StopAsync(token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 275using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestTimeout); 285await rns.WaitForResourceAsync(normalResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 288await rns.WaitForResourceAsync(explicitStartResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.NotStarted, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 291await resourcesCreatedTcs.Task.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 297await app.StopAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 319using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestTimeout); 328var notStartedResourceEvent = await rns.WaitForResourceAsync(explicitStartResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.NotStarted, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 334await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 337await rns.WaitForResourceAsync(explicitStartResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 339await startTask.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 344await app.StopAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 365await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 369await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 394using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 400var notStartedResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.NotStarted, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 401var dependentResourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Waiting, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 420await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 421var runningResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 428var dependentRunningResourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 436await orchestrator.StopResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 437await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Exited, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 440await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 441await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 443await startTask.DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 444await app.StopAsync(token).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 473using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.ExtraLongTimeoutDuration); 483notStartedResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.NotStarted, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 484dependentResourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Waiting, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 503await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 506var runningResourceEvent = await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 513var dependentRunningResourceEvent = await rns.WaitForResourceAsync(dependentResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 521await orchestrator.StopResourceAsync(runningResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 522await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Exited, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 528await orchestrator.StartResourceAsync(runningResourceEvent.ResourceId, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 529await rns.WaitForResourceAsync(notStartedResourceName, e => e.Snapshot.State?.Text == KnownResourceStates.Running, token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 532await startTask.DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 533await app.StopAsync(token).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 594await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 596var appModel = await tcs.Task.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 633await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 639await Task.WhenAll(clientA.GetStringAsync("/pid"), clientC.GetStringAsync("/pid")).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 686await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 689var list = await s.ListAsync<Container>().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 699await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 743await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 746var list = await s.ListAsync<Container>().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 764await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 787await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 790var list = await s.ListAsync<Container>().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 809await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 861await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 865var list = await s.ListAsync<Container>().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 935await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 960await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 962var dependentRunningResourceEvent = await rns.WaitForResourceAsync(container.Resource.Name, e => e.Snapshot.State?.Text == KnownResourceStates.Running).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 964await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 993await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1000r => r.Spec.Env != null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1010await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1033await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1040r => r.Spec.Env != null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1049await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1075await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1077using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestLongTimeout); 1081var redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync<Container>(kubernetes, containerPattern, r => r.Status?.State == ContainerState.Running, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1087await orchestrator.StopResourceAsync(redisContainer.Metadata.Name, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1089redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync<Container>(kubernetes, containerPattern, r => r.Status?.State == ContainerState.Exited, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1100await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1116using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestLongTimeout); 1119await app.StartAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1122var serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Running, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1125await orchestrator.StopResourceAsync(serviceA.Metadata.Name, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1127serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Finished, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1130await orchestrator.StartResourceAsync(serviceA.Metadata.Name, token).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1132serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Running, token).DefaultTimeout(TestConstants.LongTimeoutDuration); 1135await app.StopAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1158await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1161var redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync<Container>(kubernetes, $"{testName}-redis-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1164var serviceA = await KubernetesHelper.GetResourceByNameAsync<Executable>(kubernetes, $"{testName}-servicea", suffix!, r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1167var nodeApp = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, $"{testName}-nodeapp-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1184await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1207await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1218await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1239await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1242var aspireDashboard = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, $"aspire-dashboard-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1252await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1277await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1280var aspireDashboard = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, $"aspire-dashboard-{ReplicaIdRegex}-{suffix}", r => r.Status?.EffectiveEnv is not null).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1286await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1307await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1313r => r.Status?.State == ContainerState.FailedToStart && (r.Status?.Message.Contains("bob") ?? false)).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1319await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1335await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1342$"{testName}-redis-{ReplicaIdRegex}-{suffix}", r => r.Spec.VolumeMounts != null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1348await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1363await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1370$"{testName}-redis-{ReplicaIdRegex}-{suffix}", r => r.Spec.VolumeMounts != null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1377await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1392await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1399$"{testName}-redis-{ReplicaIdRegex}-{suffix}", r => r.Spec.VolumeMounts != null).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1405await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1417await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1436await foreach (var resource in s.WatchAsync<Container>().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout)) 1450await foreach (var resource in s.WatchAsync<Executable>().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout)) 1477var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1495var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1516await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1520var result = await client.GetStringAsync("pid").DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1532}).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1558await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1560using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 1564await app.WaitForTextAsync("Content root path:", resourceName: testProgram.ServiceABuilder.Resource.Name).DefaultTimeout(TestConstants.LongTimeoutDuration); 1628await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1631await app.WaitForTextAsync("Application started.").DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1635await clientA.GetStringAsync("/").DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1675await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1696await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1699await app.WaitForTextAsync("Application started.").DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1703await clientA.GetStringAsync("/").DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1748await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1765var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout)); 1788await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1824await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1826await kubernetesLifecycle.HooksCompleted.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 1840using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestLongTimeout); 1843await app.StartAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1850.DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 1855using (var logCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestTimeout)) 1864using (var logCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestTimeout)) 1878using (var logCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.DefaultOrchestratorTestTimeout)) 1892await app.StopAsync(token).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout);
Eventing\DistributedApplicationBuilderEventingTests.cs (5)
189await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 193await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 216await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 221await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 327await app.StartAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout);
Health\ResourceHealthCheckServiceTests.cs (10)
48await app.StopAsync().TimeoutAfter(TestConstants.LongTimeoutTimeSpan); 224var abortTokenSource = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 241await app.StopAsync(abortTokenSource.Token).TimeoutAfter(TestConstants.LongTimeoutTimeSpan); 265var abortTokenSource = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 308var abortTokenSource = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 357await app.StopAsync().TimeoutAfter(TestConstants.LongTimeoutTimeSpan); 423var pendingStart = app.StartAsync().DefaultTimeout(TestConstants.LongTimeoutDuration); 557await app.StopAsync().TimeoutAfter(TestConstants.LongTimeoutTimeSpan); 605await app.StopAsync().TimeoutAfter(TestConstants.LongTimeoutTimeSpan); 651await app.StopAsync().TimeoutAfter(TestConstants.LongTimeoutTimeSpan);
HealthCheckTests.cs (7)
103await rns.WaitForResourceAsync(resource.Resource.Name, KnownResourceStates.Running).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 105await rns.WaitForResourceAsync(dependentResource.Resource.Name, KnownResourceStates.Waiting).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 109await rns.WaitForResourceHealthyAsync(resource.Resource.Name).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 111await rns.WaitForResourceAsync(dependentResource.Resource.Name, KnownResourceStates.Running).DefaultTimeout(TestConstants.DefaultOrchestratorTestLongTimeout); 113await pendingStart.DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 115await app.StopAsync().DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 134}).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout);
OperationModesTests.cs (12)
31await app.StartAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 33var context = await tcs.Task.WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 35await app.StopAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 60await app.StartAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 62var context = await tcs.Task.WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 64await app.StopAsync().WaitAsync(TestConstants.LongTimeoutTimeSpan); 89await app.StartAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 91var context = await tcs.Task.WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 93await app.StopAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 120await app.StartAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 122var context = await tcs.Task.WaitAsync(TestConstants.DefaultTimeoutTimeSpan); 124await app.StopAsync().WaitAsync(TestConstants.DefaultTimeoutTimeSpan);
Publishing\ResourceContainerImageManagerTests.cs (26)
36using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 68using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 100using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 137using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 171using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 201using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 238using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 278using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 313using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 345using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 374using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 425using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 454using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 478using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 513using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 544using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 576using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 613using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 660using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 732using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 827using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 1112using var cts = new CancellationTokenSource(TestConstants.DefaultTimeoutTimeSpan); 1160using var cts = new CancellationTokenSource(TestConstants.DefaultTimeoutTimeSpan); 1193using var cts = new CancellationTokenSource(TestConstants.LongTimeoutTimeSpan); 1236using var cts = new CancellationTokenSource(TestConstants.DefaultTimeoutTimeSpan); 1269using var cts = new CancellationTokenSource(TestConstants.DefaultTimeoutTimeSpan);
SlimTestProgramTests.cs (3)
26using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 51using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 70using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration);
TestProgramFixture.cs (1)
32using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration);
tests\Shared\AsyncTestHelpers.cs (6)
40milliseconds = TestConstants.DefaultTimeoutDuration; 55milliseconds = TestConstants.DefaultTimeoutDuration; 70milliseconds = TestConstants.DefaultTimeoutDuration; 85milliseconds = TestConstants.DefaultTimeoutDuration; 100milliseconds = TestConstants.DefaultTimeoutDuration; 115milliseconds = TestConstants.DefaultTimeoutDuration;
WaitForTests.cs (36)
29var abortCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 104using var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 107using var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 135using var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 138using var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 168var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 174var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 212var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 215var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 323var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 326var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 357var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 360var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 404var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 407var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 446var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 452var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 468var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 493var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 499var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 515var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 548var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 554var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 571var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 602var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 608var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 623var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 653var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 659var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 706var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 712var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 755var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 761var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 870var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 874var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 884var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration);
WithUrlsTests.cs (2)
470using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration); 588using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(TestConstants.LongTimeoutDuration);