44 references to TestConstants
Aspire.Hosting.Tests (44)
DistributedApplicationTests.cs (11)
24
using TestConstants = Microsoft.AspNetCore.InternalTesting.
TestConstants
;
200
await Task.WhenAll(clientA.GetStringAsync("/pid"), clientC.GetStringAsync("/pid")).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
285
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
289
var redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync<Container>(kubernetes, containerPattern, r => r.Status?.State == ContainerState.Running, token).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
294
redisContainer = await KubernetesHelper.GetResourceByNameMatchAsync<Container>(kubernetes, containerPattern, r => r.Status?.State == ContainerState.Exited, token).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
323
var serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Running).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
328
serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Finished).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
333
serviceA = await KubernetesHelper.GetResourceByNameMatchAsync<Executable>(kubernetes, executablePattern, r => r.Status?.State == ExecutableState.Running).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
490
r => r.Status?.State == ContainerState.FailedToStart && (r.Status?.Message.Contains("bob") ?? false)).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
703
var result = await client.GetStringAsync("pid").DefaultTimeout(
TestConstants
.LongTimeoutDuration);
743
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
Health\ResourceHealthCheckServiceTests.cs (3)
104
var abortTokenSource = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
151
var abortTokenSource = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
269
var pendingStart = app.StartAsync().DefaultTimeout(
TestConstants
.LongTimeoutDuration);
HealthCheckTests.cs (4)
88
await rns.WaitForResourceAsync(resource.Resource.Name, KnownResourceStates.Running).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
90
await rns.WaitForResourceAsync(dependentResource.Resource.Name, KnownResourceStates.Waiting).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
94
await rns.WaitForResourceHealthyAsync(resource.Resource.Name).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
96
await rns.WaitForResourceAsync(dependentResource.Resource.Name, KnownResourceStates.Running).DefaultTimeout(
TestConstants
.LongTimeoutDuration);
SlimTestProgramTests.cs (3)
25
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
49
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
67
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
TestProgramFixture.cs (1)
33
using var cts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
tests\Shared\AsyncTestHelpers.cs (6)
34
public static CancellationTokenSource CreateDefaultTimeoutTokenSource(int milliseconds =
TestConstants
.DefaultTimeoutDuration)
44
public static async IAsyncEnumerable<T> DefaultTimeout<T>(this IAsyncEnumerable<T> asyncEnumerable, int milliseconds =
TestConstants
.DefaultTimeoutDuration, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
54
public static Task DefaultTimeout(this Task task, int milliseconds =
TestConstants
.DefaultTimeoutDuration, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
64
public static Task DefaultTimeout(this ValueTask task, int milliseconds =
TestConstants
.DefaultTimeoutDuration, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
74
public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds =
TestConstants
.DefaultTimeoutDuration, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
84
public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds =
TestConstants
.DefaultTimeoutDuration, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default)
WaitForTests.cs (16)
27
var abortCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
99
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
105
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
140
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
146
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
163
var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
188
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
194
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
211
var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
236
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
242
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
258
var runningStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
285
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
291
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
319
var startupCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);
325
var waitingStateCts = AsyncTestHelpers.CreateDefaultTimeoutTokenSource(
TestConstants
.LongTimeoutDuration);