Skip to content

Commit 0b40b07

Browse files
Illia MazuriakIllia Mazuriak
Illia Mazuriak
authored and
Illia Mazuriak
committed
#8488 Fixed warning xunit1051 Part 1
tests\Aspire.Azure.AI.OpenAI.Tests tests\Aspire.Components.Common.Tests tests\Aspire.Confluent.Kafka.Tests tests\Aspire.Dashboard.Components.Tests tests\Aspire.Elastic.Clients.Elasticsearch.Tests tests\Aspire.Hosting.Analyzers.Tests tests\Aspire.Hosting.Kubernetes.Tests tests\Aspire.Hosting.Python.Tests Fixed in next projects tests\Aspire.Hosting.Redis.Tests tests\Aspire.Hosting.Seq.Tests tests\Aspire.Hosting.SqlServer.Tests tests\Aspire.Hosting.Testing.Tests tests\Aspire.Hosting.Valkey.Tests tests\Aspire.Milvus.Client.Tests tests\Aspire.MongoDB.Driver.Tests tests\Aspire.NATS.Net.Tests tests\Aspire.OpenAI.Tests tests\Aspire.Playground.Tests tests\Aspire.Qdrant.Client.Tests tests\Aspire.RabbitMQ.Client.Tests tests\Aspire.StackExchange.Redis.Tests tests\Aspire.Templates.Tests tests\Microsoft.Extensions.ServiceDiscovery.Tests
1 parent 8fd92af commit 0b40b07

File tree

64 files changed

+321
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+321
-317
lines changed

Directory.Build.props

-5
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@
3434
<DashboardPublishedArtifactsOutputDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'DashboardArtifacts', '$(Configuration)'))</DashboardPublishedArtifactsOutputDir>
3535
<WorkloadsPackageSource>$(ArtifactsShippingPackagesDir)</WorkloadsPackageSource>
3636

37-
<!-- Issue: https://github.com/dotnet/aspire/issues/8488 -->
38-
<!-- xUnit2031: Do not use Where clause with Assert.Single -->
39-
<!-- xUnit1051: Calls to methods which accept CancellationToken should use TestContext.Current.CancellationToken to allow test cancellation to be more responsive. -->
40-
<!-- TODO: Re-enable and remove this. -->
41-
<NoWarn>$(NoWarn);xUnit2031;xUnit1051</NoWarn>
4237
</PropertyGroup>
4338

4439
<!-- OS/Architecture properties for local development resources -->

tests/Aspire.Azure.AI.OpenAI.Tests/AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public async Task CanConfigurePipelineAsync(bool useKeyed)
214214
host.Services.GetRequiredKeyedService<IChatClient>("openai_chatclient") :
215215
host.Services.GetRequiredService<IChatClient>();
216216

217-
var completion = await client.GetResponseAsync("Whatever");
217+
var completion = await client.GetResponseAsync("Whatever", cancellationToken: TestContext.Current.CancellationToken);
218218
Assert.Equal("Hello from middleware", completion.Text);
219219

220220
static Task<ChatResponse> TestMiddleware(IEnumerable<ChatMessage> list, ChatOptions? options, IChatClient client, CancellationToken token)

tests/Aspire.Azure.AI.OpenAI.Tests/AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public async Task CanConfigurePipelineAsync(bool useKeyed)
214214
host.Services.GetRequiredKeyedService<IEmbeddingGenerator<string, Embedding<float>>>("openai_embeddinggenerator") :
215215
host.Services.GetRequiredService<IEmbeddingGenerator<string, Embedding<float>>>();
216216

217-
var vector = await generator.GenerateEmbeddingVectorAsync("Hello");
217+
var vector = await generator.GenerateEmbeddingVectorAsync("Hello", cancellationToken: TestContext.Current.CancellationToken);
218218
Assert.Equal(1.23f, vector.ToArray().Single());
219219
}
220220

tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
@@ -9,6 +9,7 @@
99
<!-- Do not run tests in Helix at all -->
1010
<RunOnAzdoHelixWindows>false</RunOnAzdoHelixWindows>
1111
<RunOnAzdoHelixLinux>false</RunOnAzdoHelixLinux>
12+
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
1213
</PropertyGroup>
1314

1415
<ItemGroup>

tests/Aspire.Components.Common.Tests/ConformanceTests.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ await healthCheckService.CheckHealthAsync(healthCheckRegistration =>
135135
{
136136
registeredNames.Add(healthCheckRegistration.Name);
137137
return false;
138-
}).ConfigureAwait(false);
138+
},
139+
TestContext.Current.CancellationToken).ConfigureAwait(false);
139140
#pragma warning restore xUnit1030 // Do not call ConfigureAwait(false) in test method
140141

141142
Assert.Equal(2, registeredNames.Count);
@@ -320,7 +321,7 @@ public async Task HealthCheckReportsExpectedStatus(string? key)
320321
HealthCheckService healthCheckService = host.Services.GetRequiredService<HealthCheckService>();
321322

322323
#pragma warning disable xUnit1030 // Do not call ConfigureAwait(false) in test method
323-
HealthReport healthReport = await healthCheckService.CheckHealthAsync().ConfigureAwait(false);
324+
HealthReport healthReport = await healthCheckService.CheckHealthAsync(TestContext.Current.CancellationToken).ConfigureAwait(false);
324325
#pragma warning restore xUnit1030 // Do not call ConfigureAwait(false) in test method
325326

326327
HealthStatus expected = CanConnectToServer ? HealthStatus.Healthy : HealthStatus.Unhealthy;

tests/Aspire.Confluent.Kafka.Tests/Aspire8MetricsTests.cs

+18-18
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task ExposesStatisticsAsCountersAndGauge_InitializeCounters(TestVar
3838
}
3939

4040
using var host = builder.Build();
41-
await host.StartAsync();
41+
await host.StartAsync(TestContext.Current.CancellationToken);
4242

4343
var metricsChannel = host.Services.GetRequiredService(ReflectionHelpers.MetricsChannelType.Value);
4444
var writer = GetMetricsChannelWriter(metricsChannel)!;
@@ -61,14 +61,14 @@ public async Task ExposesStatisticsAsCountersAndGauge_InitializeCounters(TestVar
6161
}
6262

6363
await Task.WhenAll(
64-
collectorNetworkTx.WaitForMeasurementsAsync(statistics.Count),
65-
collectorNetworkTransmitted.WaitForMeasurementsAsync(statistics.Count),
66-
collectorNetworkRx.WaitForMeasurementsAsync(statistics.Count),
67-
collectorNetworkReceived.WaitForMeasurementsAsync(statistics.Count),
68-
collectorMessageTx.WaitForMeasurementsAsync(statistics.Count),
69-
collectorMessageTransmitted.WaitForMeasurementsAsync(statistics.Count),
70-
collectorMessageRx.WaitForMeasurementsAsync(statistics.Count),
71-
collectorMessageReceived.WaitForMeasurementsAsync(statistics.Count)
64+
collectorNetworkTx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
65+
collectorNetworkTransmitted.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
66+
collectorNetworkRx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
67+
collectorNetworkReceived.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
68+
collectorMessageTx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
69+
collectorMessageTransmitted.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
70+
collectorMessageRx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
71+
collectorMessageReceived.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken)
7272
);
7373

7474
collectorConsumerQueueMessageCount.RecordObservableInstruments();
@@ -153,7 +153,7 @@ public async Task ExposesStatisticsAsCountersAndGauge_AggregateCountersByName(Te
153153
}
154154

155155
using var host = builder.Build();
156-
await host.StartAsync();
156+
await host.StartAsync(TestContext.Current.CancellationToken);
157157

158158
var metricsChannel = host.Services.GetRequiredService(ReflectionHelpers.MetricsChannelType.Value);
159159
var writer = GetMetricsChannelWriter(metricsChannel)!;
@@ -176,14 +176,14 @@ public async Task ExposesStatisticsAsCountersAndGauge_AggregateCountersByName(Te
176176
}
177177

178178
await Task.WhenAll(
179-
collectorNetworkTx.WaitForMeasurementsAsync(statistics.Count),
180-
collectorNetworkTransmitted.WaitForMeasurementsAsync(statistics.Count),
181-
collectorNetworkRx.WaitForMeasurementsAsync(statistics.Count),
182-
collectorNetworkReceived.WaitForMeasurementsAsync(statistics.Count),
183-
collectorMessageTx.WaitForMeasurementsAsync(statistics.Count),
184-
collectorMessageTransmitted.WaitForMeasurementsAsync(statistics.Count),
185-
collectorMessageRx.WaitForMeasurementsAsync(statistics.Count),
186-
collectorMessageReceived.WaitForMeasurementsAsync(statistics.Count)
179+
collectorNetworkTx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
180+
collectorNetworkTransmitted.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
181+
collectorNetworkRx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
182+
collectorNetworkReceived.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
183+
collectorMessageTx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
184+
collectorMessageTransmitted.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
185+
collectorMessageRx.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken),
186+
collectorMessageReceived.WaitForMeasurementsAsync(statistics.Count, TestContext.Current.CancellationToken)
187187
);
188188

189189
collectorConsumerQueueMessageCount.RecordObservableInstruments();

tests/Aspire.Confluent.Kafka.Tests/OtelMetricsTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public async Task EnsureMetricsAreProducedAsync(bool useKeyed)
6060
builder.Services.AddOpenTelemetry().WithMetrics(meterProvider => meterProvider.AddInMemoryExporter(metrics));
6161

6262
using var host = builder.Build();
63-
await host.StartAsync();
63+
await host.StartAsync(TestContext.Current.CancellationToken);
6464
IGrouping<string, Metric>[] groups;
6565

6666
string topic = $"otel-topic-{Guid.NewGuid()}";
@@ -90,7 +90,7 @@ public async Task EnsureMetricsAreProducedAsync(bool useKeyed)
9090
int j = 0;
9191
while (true)
9292
{
93-
var consumerResult = consumer.Consume();
93+
var consumerResult = consumer.Consume(TestContext.Current.CancellationToken);
9494
if (consumerResult == null)
9595
{
9696
continue;
@@ -108,7 +108,7 @@ public async Task EnsureMetricsAreProducedAsync(bool useKeyed)
108108

109109
host.Services.GetRequiredService<MeterProvider>().EnsureMetricsAreFlushed();
110110

111-
await host.StopAsync();
111+
await host.StopAsync(TestContext.Current.CancellationToken);
112112

113113
groups = metrics.Where(x => x.MeterName == "OpenTelemetry.Instrumentation.ConfluentKafka")
114114
.GroupBy(x => x.Name).ToArray();

tests/Aspire.Confluent.Kafka.Tests/OtelTracesTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public async Task EnsureTracesAreProducedAsync(bool useKeyed)
6262
builder.Services.AddOpenTelemetry().WithTracing(traceProviderBuilder => traceProviderBuilder.AddInMemoryExporter(activities));
6363

6464
using var host = builder.Build();
65-
await host.StartAsync();
65+
await host.StartAsync(TestContext.Current.CancellationToken);
6666

6767
string topic = $"otel-topic-{Guid.NewGuid()}";
6868
using (var producer = useKeyed
@@ -95,7 +95,7 @@ public async Task EnsureTracesAreProducedAsync(bool useKeyed)
9595
int j = 0;
9696
while (true)
9797
{
98-
var consumerResult = consumer.Consume();
98+
var consumerResult = consumer.Consume(TestContext.Current.CancellationToken);
9999
if (consumerResult == null)
100100
{
101101
continue;
@@ -113,6 +113,6 @@ public async Task EnsureTracesAreProducedAsync(bool useKeyed)
113113

114114
Assert.Equal(5, activities.Where(x => x.OperationName == $"{topic} receive").Count());
115115

116-
await host.StopAsync();
116+
await host.StopAsync(TestContext.Current.CancellationToken);
117117
}
118118
}

tests/Aspire.Dashboard.Components.Tests/Layout/MainLayoutTests.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
using Microsoft.FluentUI.AspNetCore.Components;
1717
using Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip;
1818
using Xunit;
19-
19+
using TestContext = Xunit.TestContext;
20+
2021
namespace Aspire.Dashboard.Components.Tests.Layout;
2122

2223
[UseCulture("en-US")]
@@ -72,13 +73,13 @@ public async Task OnInitialize_UnsecuredOtlp_NotDismissed_DisplayMessageBar()
7273
});
7374

7475
// Assert
75-
await messageShownTcs.Task.WaitAsync(TimeSpan.FromSeconds(5));
76+
await messageShownTcs.Task.WaitAsync(TimeSpan.FromSeconds(5), TestContext.Current.CancellationToken);
7677

7778
Assert.NotNull(message);
7879

7980
message.Close();
8081

81-
Assert.True(await dismissedSettingSetTcs.Task.WaitAsync(TimeSpan.FromSeconds(5)));
82+
Assert.True(await dismissedSettingSetTcs.Task.WaitAsync(TimeSpan.FromSeconds(5), TestContext.Current.CancellationToken));
8283
}
8384

8485
[Fact]
@@ -116,8 +117,8 @@ public async Task OnInitialize_UnsecuredOtlp_Dismissed_NoMessageBar()
116117
});
117118

118119
// Assert
119-
var timeoutTask = Task.Delay(100);
120-
var completedTask = await Task.WhenAny(messageShownTcs.Task, timeoutTask).WaitAsync(TimeSpan.FromSeconds(5));
120+
var timeoutTask = Task.Delay(100, TestContext.Current.CancellationToken);
121+
var completedTask = await Task.WhenAny(messageShownTcs.Task, timeoutTask).WaitAsync(TimeSpan.FromSeconds(5), TestContext.Current.CancellationToken);
121122

122123
// It's hard to test something not happening.
123124
// In this case of checking for a message, apply a small display and then double check that no message was displayed.

tests/Aspire.Dashboard.Components.Tests/Pages/ConsoleLogsTests.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using Microsoft.Extensions.Options;
2525
using Microsoft.FluentUI.AspNetCore.Components;
2626
using Xunit;
27+
using TestContext = Xunit.TestContext;
2728

2829
namespace Aspire.Dashboard.Components.Tests.Pages;
2930

@@ -90,7 +91,7 @@ public async Task ResourceName_SubscribeOnLoadAndChange_SubscribeConsoleLogsOnce
9091
logger.LogInformation("Waiting for finish message.");
9192
cut.WaitForState(() => instance.PageViewModel.Status == loc[nameof(Resources.ConsoleLogs.ConsoleLogsFinishedWatchingLogs)]);
9293

93-
var subscribedResourceName1 = await subscribedResourceNamesChannel.Reader.ReadAsync().DefaultTimeout();
94+
var subscribedResourceName1 = await subscribedResourceNamesChannel.Reader.ReadAsync(TestContext.Current.CancellationToken).DefaultTimeout();
9495
Assert.Equal("test-resource", subscribedResourceName1);
9596

9697
navigationManager.LocationChanged += (sender, e) =>
@@ -116,11 +117,11 @@ public async Task ResourceName_SubscribeOnLoadAndChange_SubscribeConsoleLogsOnce
116117
cut.WaitForState(() => instance.PageViewModel.SelectedResource == testResource2);
117118
cut.WaitForState(() => instance.PageViewModel.Status == loc[nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
118119

119-
var subscribedResourceName2 = await subscribedResourceNamesChannel.Reader.ReadAsync().DefaultTimeout();
120+
var subscribedResourceName2 = await subscribedResourceNamesChannel.Reader.ReadAsync(TestContext.Current.CancellationToken).DefaultTimeout();
120121
Assert.Equal("test-resource2", subscribedResourceName2);
121122

122123
subscribedResourceNamesChannel.Writer.Complete();
123-
Assert.False(await subscribedResourceNamesChannel.Reader.WaitToReadAsync().DefaultTimeout());
124+
Assert.False(await subscribedResourceNamesChannel.Reader.WaitToReadAsync(TestContext.Current.CancellationToken).DefaultTimeout());
124125
}
125126

126127
[Fact]

tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
<!--
66
CS8002: Referenced assembly does not have a strong name
77
-->
8-
<NoWarn>$(NoWarn);CS8002</NoWarn>
8+
<!--
9+
FIXME: https://github.com/dotnet/aspire/issues/8488
10+
xUnit1051: Calls to methods which accept CancellationToken should use TestContext.Current.CancellationToken to allow test cancellation to be more responsive
11+
12+
This is being disabled here in addition to any central location, because this project
13+
gets built independently on helix.
14+
-->
15+
<NoWarn>$(NoWarn);CS8002;xUnit1051</NoWarn>
916

1017
<InstallBrowsersForPlaywright Condition="'$(InstallBrowsersForPlaywright)' == '' and '$(CODESPACES)' == 'true'">true</InstallBrowsersForPlaywright>
1118
<InstallBrowsersForPlaywright Condition="'$(InstallBrowsersForPlaywright)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">true</InstallBrowsersForPlaywright>

tests/Aspire.Elastic.Clients.Elasticsearch.Tests/AspireElasticClientExtensionsTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task AddElasticsearchClient_HealthCheckShouldBeRegisteredWhenEnable
5757

5858
var healthCheckService = host.Services.GetRequiredService<HealthCheckService>();
5959

60-
var healthCheckReport = await healthCheckService.CheckHealthAsync();
60+
var healthCheckReport = await healthCheckService.CheckHealthAsync(TestContext.Current.CancellationToken);
6161

6262
var healthCheckName = useKeyed ? $"Elastic.Clients.Elasticsearch_{key}" : "Elastic.Clients.Elasticsearch";
6363

tests/Aspire.Hosting.Analyzers.Tests/CombinationsAnalyzerTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void AddMultiple(this IDistributedApplicationBuilder builder, [Res
4141
CompilerError(diagnostic.Id).WithLocation(8, 5).WithMessage(message2)
4242
]);
4343

44-
await test.RunAsync();
44+
await test.RunAsync(TestContext.Current.CancellationToken);
4545
}
4646

4747
[Theory]
@@ -74,6 +74,6 @@ public static void AddMultiple(this IDistributedApplicationBuilder builder, [Res
7474
CompilerError(diagnostic.Id).WithLocation(6, 21).WithMessage(message2)
7575
]);
7676

77-
await test.RunAsync();
77+
await test.RunAsync(TestContext.Current.CancellationToken);
7878
}
7979
}

tests/Aspire.Hosting.Analyzers.Tests/EndpointNameAnalyzerTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task EndpointNameInvalid(string endpointName)
2727
""",
2828
[CompilerError(diagnostic.Id).WithLocation(6, 37).WithMessage(message)]);
2929

30-
await test.RunAsync();
30+
await test.RunAsync(TestContext.Current.CancellationToken);
3131
}
3232

3333
[Theory]
@@ -66,7 +66,7 @@ public static IResourceBuilder<ContainerResource> WithEndpoints(
6666
CompilerError(diagnostic.Id).WithLocation(9, 9).WithMessage(message2)
6767
]);
6868

69-
await test.RunAsync();
69+
await test.RunAsync(TestContext.Current.CancellationToken);
7070
}
7171

7272
[Theory]
@@ -82,7 +82,7 @@ public async Task EndpointNameValid(string endpointName)
8282
.WithEndpoint(port: 1234, name: "{{endpointName}}");
8383
""", []);
8484

85-
await test.RunAsync();
85+
await test.RunAsync(TestContext.Current.CancellationToken);
8686
}
8787

8888
[Theory]
@@ -112,6 +112,6 @@ public static IResourceBuilder<ContainerResource> WithEndpoints(
112112
}
113113
""", []);
114114

115-
await test.RunAsync();
115+
await test.RunAsync(TestContext.Current.CancellationToken);
116116
}
117117
}

tests/Aspire.Hosting.Analyzers.Tests/ResourceNameAnalyzerTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public async Task ResourceNameInvalid(string resourceName)
2626
""",
2727
[CompilerError(diagnostic.Id).WithLocation(5, 22).WithMessage(message)]);
2828

29-
await test.RunAsync();
29+
await test.RunAsync(TestContext.Current.CancellationToken);
3030
}
3131

3232
[Theory]
@@ -61,7 +61,7 @@ public static void AddMultipleParameters(this IDistributedApplicationBuilder bui
6161
CompilerError(diagnostic.Id).WithLocation(8, 5).WithMessage(message2)
6262
]);
6363

64-
await test.RunAsync();
64+
await test.RunAsync(TestContext.Current.CancellationToken);
6565
}
6666

6767
[Theory]
@@ -76,7 +76,7 @@ public async Task ResourceNameValid(string resourceName)
7676
builder.AddParameter("{{resourceName}}");
7777
""", []);
7878

79-
await test.RunAsync();
79+
await test.RunAsync(TestContext.Current.CancellationToken);
8080
}
8181

8282
[Theory]
@@ -102,6 +102,6 @@ public static void AddMultipleParameters(this IDistributedApplicationBuilder bui
102102
}
103103
""", []);
104104

105-
await test.RunAsync();
105+
await test.RunAsync(TestContext.Current.CancellationToken);
106106
}
107107
}

tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
5+
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
56
</PropertyGroup>
67

78
<ItemGroup>

tests/Aspire.Hosting.Containers.Tests/Aspire.Hosting.Containers.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
5+
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
56
</PropertyGroup>
67

78
<ItemGroup>

tests/Aspire.Hosting.Docker.Tests/Aspire.Hosting.Docker.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
5-
<NoWarn>$(NoWarn);ASPIREHOSTINGPYTHON001;</NoWarn>
5+
<NoWarn>$(NoWarn);ASPIREHOSTINGPYTHON001;xUnit1051</NoWarn>
66

77
<!--
88
Do not run tests in Helix at all

tests/Aspire.Hosting.Elasticsearch.Tests/Aspire.Hosting.Elasticsearch.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
5+
<NoWarn>$(NoWarn);xUnit1051</NoWarn>
56
</PropertyGroup>
67

78
<ItemGroup>

0 commit comments

Comments
 (0)