Skip to content

Commit 3294486

Browse files
authored
Upgrade tooling for 9.0x (#5483)
* Update dependencies from ".NET 9 Eng" channel Updating 'Microsoft.SourceBuild.Intermediate.source-build-reference-packages': '8.0.0-alpha.1.23516.4' => '9.0.0-alpha.1.24453.2' (from build '20240903.2' of 'https://github.com/dotnet/source-build-reference-packages') Updating 'Microsoft.SourceBuild.Intermediate.arcade': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.Arcade.Sdk': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.Build.Tasks.Installers': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.Build.Tasks.Workloads': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.Helix.Sdk': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.RemoteExecutor': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.SharedFramework.Sdk': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') Updating 'Microsoft.DotNet.XUnitExtensions': '8.0.0-beta.24426.2' => '9.0.0-beta.24453.1' (from build '20240903.1' of 'https://github.com/dotnet/arcade') * Add dotnet 8 versions for testing * [tests] Install 8.0 runtime for workload testing * Resolve xUnit2013 warning `Do not use Assert.Equal() to check for collection size. Use Assert.Single instead.xUnit2013` * Resolve xUnit2029 warning `Do not use Assert.Empty() to check if a value does not exist in a collection. Use Assert.DoesNotContain() instead.xUnit2029` * Track API change in EqualException * Ignore warning xUnit1030 `error xUnit1030: Test methods should not call ConfigureAwait(false), as it may bypass parallelization limits. Omit ConfigureAwait, or use ConfigureAwait(true) to avoid CA2007. (https://xunit.net/xunit.analyzers/rules/xUnit1030)` * Fix xUnit1012 analyzer warning. Warning of the form: `error xUnit1012: Null should not be used for type parameter 'secondaryApiKey' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)` * Fix compile error. `error CS0121: The call is ambiguous between the following methods or properties: 'Assert.Contains<T>(T, HashSet<T>)' and 'Assert.Contains<T>(T, SortedSet<T>)'` * couple more fixes * Update nuget.config to use dotnet9 sources instead of dotnet8 * Remove unnecessary package reference to Microsoft.DotNet.XunitAssert * Address xUnit1030 warning. `error xUnit1030: Test methods should not call ConfigureAwait(false), as it may bypass parallelization limits. Omit ConfigureAwait, or use ConfigureAwait(true) to avoid CA2007. (https://xunit.net/xunit.analyzers/rules/xUnit1030)` * Ignore some lint warnings for eng/common/template-guidance.md from arcade * cleanup * Fix AzureFunctionsEndToEnd * Track changes for Aspire.Hosting.Azure.Functions * Fix CA2007: src\Aspire.Hosting\Health\ResourceHealthCheckScheduler.cs(38,45): error CA2007: Consider calling ConfigureAwait on the awaited task * Add dependency to Microsoft.DotNet.XliffTasks from dotnet/arcade * Add back skipping hosting.sdk, and projectTemplates packages .. in workload testing as it is required for the internal build. `Aspire.Hosting.Sdk.Msi.arm64.9.0.0-preview.4.24460.2.nupkg, Aspire.Hosting.Sdk.Msi.x64.9.0.0-preview.4.24460.2.nupkg, Aspire.Hosting.Sdk.Msi.x86.9.0.0-preview.4.24460.2.nupkg, Aspire.ProjectTemplates.Msi.arm64.9.0.0-preview.4.24460.2.nupkg, Aspire.ProjectTemplates.Msi.x64.9.0.0-preview.4.24460.2.nupkg, Aspire.ProjectTemplates.Msi.x86.9.0.0-preview.4.24460.2.nupkg` * [tests] Increase the default timeout from 10mins to 15mins for basictests .. like the various hosting integration tests. The run time can vary especially if docker needs to fetch an image.
1 parent a53b7ba commit 3294486

File tree

12 files changed

+44
-44
lines changed

12 files changed

+44
-44
lines changed

src/Libraries/Microsoft.Extensions.ServiceDiscovery.Abstractions/Microsoft.Extensions.ServiceDiscovery.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<IsPackable>true</IsPackable>
66
<IsAotCompatible>true</IsAotCompatible>
77
<Description>Provides abstractions for service discovery. Interfaces defined in this package are implemented in Microsoft.Extensions.ServiceDiscovery and other service discovery packages.</Description>

src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/Microsoft.Extensions.ServiceDiscovery.Dns.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<IsPackable>true</IsPackable>
66
<IsAotCompatible>true</IsAotCompatible>
77
<Description>Provides extensions to HttpClient to resolve well-known hostnames to concrete endpoints based on DNS records. Useful for service resolution in orchestrators such as Kubernetes.</Description>

src/Libraries/Microsoft.Extensions.ServiceDiscovery.Yarp/Microsoft.Extensions.ServiceDiscovery.Yarp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>true</IsPackable>

src/Libraries/Microsoft.Extensions.ServiceDiscovery/Microsoft.Extensions.ServiceDiscovery.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<IsPackable>true</IsPackable>
66
<IsAotCompatible>true</IsAotCompatible>
77
<Description>Provides extensions to HttpClient that enable service discovery based on configuration.</Description>

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns.Tests/DnsSrvServiceEndpointResolverTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public async Task ResolveServiceEndpoint_DnsSrv()
112112
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
113113
watcher.OnEndpointsUpdated = tcs.SetResult;
114114
watcher.Start();
115-
var initialResult = await tcs.Task.ConfigureAwait(false);
115+
var initialResult = await tcs.Task;
116116
Assert.NotNull(initialResult);
117117
Assert.True(initialResult.ResolvedSuccessfully);
118118
Assert.Equal(3, initialResult.EndpointSource.Endpoints.Count);
@@ -199,7 +199,7 @@ public async Task ResolveServiceEndpoint_DnsSrv_MultipleProviders_PreventMixing(
199199
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
200200
watcher.OnEndpointsUpdated = tcs.SetResult;
201201
watcher.Start();
202-
var initialResult = await tcs.Task.ConfigureAwait(false);
202+
var initialResult = await tcs.Task;
203203
Assert.NotNull(initialResult);
204204
Assert.Null(initialResult.Exception);
205205
Assert.True(initialResult.ResolvedSuccessfully);

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns.Tests/Microsoft.Extensions.ServiceDiscovery.Dns.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Tests/ConfigurationServiceEndpointResolverTests.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public async Task ResolveServiceEndpoint_Configuration_SingleResult_NoScheme()
3737
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
3838
watcher.OnEndpointsUpdated = tcs.SetResult;
3939
watcher.Start();
40-
var initialResult = await tcs.Task.ConfigureAwait(false);
40+
var initialResult = await tcs.Task;
4141
Assert.NotNull(initialResult);
4242
Assert.True(initialResult.ResolvedSuccessfully);
4343
var ep = Assert.Single(initialResult.EndpointSource.Endpoints);
@@ -81,7 +81,7 @@ public async Task ResolveServiceEndpoint_Configuration_DisallowedScheme()
8181
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
8282
watcher.OnEndpointsUpdated = tcs.SetResult;
8383
watcher.Start();
84-
var initialResult = await tcs.Task.ConfigureAwait(false);
84+
var initialResult = await tcs.Task;
8585
Assert.NotNull(initialResult);
8686
Assert.True(initialResult.ResolvedSuccessfully);
8787
Assert.Empty(initialResult.EndpointSource.Endpoints);
@@ -95,7 +95,7 @@ public async Task ResolveServiceEndpoint_Configuration_DisallowedScheme()
9595
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
9696
watcher.OnEndpointsUpdated = tcs.SetResult;
9797
watcher.Start();
98-
var initialResult = await tcs.Task.ConfigureAwait(false);
98+
var initialResult = await tcs.Task;
9999
Assert.NotNull(initialResult);
100100
Assert.True(initialResult.ResolvedSuccessfully);
101101
var ep = Assert.Single(initialResult.EndpointSource.Endpoints);
@@ -110,7 +110,7 @@ public async Task ResolveServiceEndpoint_Configuration_DisallowedScheme()
110110
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
111111
watcher.OnEndpointsUpdated = tcs.SetResult;
112112
watcher.Start();
113-
var initialResult = await tcs.Task.ConfigureAwait(false);
113+
var initialResult = await tcs.Task;
114114
Assert.NotNull(initialResult);
115115
Assert.True(initialResult.ResolvedSuccessfully);
116116
var ep = Assert.Single(initialResult.EndpointSource.Endpoints);
@@ -125,7 +125,7 @@ public async Task ResolveServiceEndpoint_Configuration_DisallowedScheme()
125125
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
126126
watcher.OnEndpointsUpdated = tcs.SetResult;
127127
watcher.Start();
128-
var initialResult = await tcs.Task.ConfigureAwait(false);
128+
var initialResult = await tcs.Task;
129129
Assert.NotNull(initialResult);
130130
Assert.True(initialResult.ResolvedSuccessfully);
131131
var ep = Assert.Single(initialResult.EndpointSource.Endpoints);
@@ -165,10 +165,10 @@ public async Task ResolveServiceEndpoint_Configuration_DefaultEndpointName()
165165
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
166166
watcher.OnEndpointsUpdated = tcs.SetResult;
167167
watcher.Start();
168-
var initialResult = await tcs.Task.ConfigureAwait(false);
168+
var initialResult = await tcs.Task;
169169
Assert.NotNull(initialResult);
170170
Assert.True(initialResult.ResolvedSuccessfully);
171-
Assert.Equal(1, initialResult.EndpointSource.Endpoints.Count);
171+
Assert.Single(initialResult.EndpointSource.Endpoints);
172172
Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
173173

174174
Assert.All(initialResult.EndpointSource.Endpoints, ep =>
@@ -187,10 +187,10 @@ public async Task ResolveServiceEndpoint_Configuration_DefaultEndpointName()
187187
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
188188
watcher.OnEndpointsUpdated = tcs.SetResult;
189189
watcher.Start();
190-
var initialResult = await tcs.Task.ConfigureAwait(false);
190+
var initialResult = await tcs.Task;
191191
Assert.NotNull(initialResult);
192192
Assert.True(initialResult.ResolvedSuccessfully);
193-
Assert.Equal(1, initialResult.EndpointSource.Endpoints.Count);
193+
Assert.Single(initialResult.EndpointSource.Endpoints);
194194
Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
195195
}
196196

@@ -202,10 +202,10 @@ public async Task ResolveServiceEndpoint_Configuration_DefaultEndpointName()
202202
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
203203
watcher.OnEndpointsUpdated = tcs.SetResult;
204204
watcher.Start();
205-
var initialResult = await tcs.Task.ConfigureAwait(false);
205+
var initialResult = await tcs.Task;
206206
Assert.NotNull(initialResult);
207207
Assert.True(initialResult.ResolvedSuccessfully);
208-
Assert.Equal(1, initialResult.EndpointSource.Endpoints.Count);
208+
Assert.Single(initialResult.EndpointSource.Endpoints);
209209
Assert.Equal(new UriEndPoint(new Uri("https://localhost:8080")), initialResult.EndpointSource.Endpoints[0].EndPoint);
210210
}
211211
}
@@ -256,12 +256,12 @@ public async Task ResolveServiceEndpoint_Configuration_DefaultEndpointName_Resol
256256
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
257257
watcher.OnEndpointsUpdated = tcs.SetResult;
258258
watcher.Start();
259-
var initialResult = await tcs.Task.ConfigureAwait(false);
259+
var initialResult = await tcs.Task;
260260
Assert.NotNull(initialResult);
261261
Assert.True(initialResult.ResolvedSuccessfully);
262262
if (expectedResult is not null)
263263
{
264-
Assert.Equal(1, initialResult.EndpointSource.Endpoints.Count);
264+
Assert.Single(initialResult.EndpointSource.Endpoints);
265265
Assert.Equal(new UriEndPoint(new Uri(expectedResult)), initialResult.EndpointSource.Endpoints[0].EndPoint);
266266
}
267267
else
@@ -296,7 +296,7 @@ public async Task ResolveServiceEndpoint_Configuration_MultipleResults()
296296
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
297297
watcher.OnEndpointsUpdated = tcs.SetResult;
298298
watcher.Start();
299-
var initialResult = await tcs.Task.ConfigureAwait(false);
299+
var initialResult = await tcs.Task;
300300
Assert.NotNull(initialResult);
301301
Assert.True(initialResult.ResolvedSuccessfully);
302302
Assert.Equal(2, initialResult.EndpointSource.Endpoints.Count);
@@ -318,7 +318,7 @@ public async Task ResolveServiceEndpoint_Configuration_MultipleResults()
318318
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
319319
watcher.OnEndpointsUpdated = tcs.SetResult;
320320
watcher.Start();
321-
var initialResult = await tcs.Task.ConfigureAwait(false);
321+
var initialResult = await tcs.Task;
322322
Assert.NotNull(initialResult);
323323
Assert.True(initialResult.ResolvedSuccessfully);
324324
Assert.Equal(2, initialResult.EndpointSource.Endpoints.Count);
@@ -363,7 +363,7 @@ public async Task ResolveServiceEndpoint_Configuration_MultipleProtocols()
363363
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
364364
watcher.OnEndpointsUpdated = tcs.SetResult;
365365
watcher.Start();
366-
var initialResult = await tcs.Task.ConfigureAwait(false);
366+
var initialResult = await tcs.Task;
367367
Assert.NotNull(initialResult);
368368
Assert.True(initialResult.ResolvedSuccessfully);
369369
Assert.Equal(3, initialResult.EndpointSource.Endpoints.Count);
@@ -408,7 +408,7 @@ public async Task ResolveServiceEndpoint_Configuration_MultipleProtocols_WithSpe
408408
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
409409
watcher.OnEndpointsUpdated = tcs.SetResult;
410410
watcher.Start();
411-
var initialResult = await tcs.Task.ConfigureAwait(false);
411+
var initialResult = await tcs.Task;
412412
Assert.NotNull(initialResult);
413413
Assert.True(initialResult.ResolvedSuccessfully);
414414
Assert.Equal(3, initialResult.EndpointSource.Endpoints.Count);

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Tests/Microsoft.Extensions.ServiceDiscovery.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(NetCurrent)</TargetFramework>
4+
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Tests/PassThroughServiceEndpointResolverTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public async Task ResolveServiceEndpoint_PassThrough()
3232
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
3333
watcher.OnEndpointsUpdated = tcs.SetResult;
3434
watcher.Start();
35-
var initialResult = await tcs.Task.ConfigureAwait(false);
35+
var initialResult = await tcs.Task;
3636
Assert.NotNull(initialResult);
3737
Assert.True(initialResult.ResolvedSuccessfully);
3838
var ep = Assert.Single(initialResult.EndpointSource.Endpoints);
@@ -63,7 +63,7 @@ public async Task ResolveServiceEndpoint_Superseded()
6363
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
6464
watcher.OnEndpointsUpdated = tcs.SetResult;
6565
watcher.Start();
66-
var initialResult = await tcs.Task.ConfigureAwait(false);
66+
var initialResult = await tcs.Task;
6767
Assert.NotNull(initialResult);
6868
Assert.True(initialResult.ResolvedSuccessfully);
6969

@@ -96,7 +96,7 @@ public async Task ResolveServiceEndpoint_Fallback()
9696
var tcs = new TaskCompletionSource<ServiceEndpointResolverResult>();
9797
watcher.OnEndpointsUpdated = tcs.SetResult;
9898
watcher.Start();
99-
var initialResult = await tcs.Task.ConfigureAwait(false);
99+
var initialResult = await tcs.Task;
100100
Assert.NotNull(initialResult);
101101
Assert.True(initialResult.ResolvedSuccessfully);
102102

test/Libraries/Microsoft.Extensions.ServiceDiscovery.Tests/ServiceEndpointResolverTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public async Task ResolveServiceEndpoint()
109109
await using ((watcher = watcherFactory.CreateWatcher("http://basket")).ConfigureAwait(false))
110110
{
111111
Assert.NotNull(watcher);
112-
var initialResult = await watcher.GetEndpointsAsync(CancellationToken.None).ConfigureAwait(false);
112+
var initialResult = await watcher.GetEndpointsAsync(CancellationToken.None);
113113
Assert.NotNull(initialResult);
114114
var sep = Assert.Single(initialResult.Endpoints);
115115
var ip = Assert.IsType<IPEndPoint>(sep.EndPoint);
@@ -121,7 +121,7 @@ public async Task ResolveServiceEndpoint()
121121
Assert.False(tcs.Task.IsCompleted);
122122

123123
cts[0].Cancel();
124-
var resolverResult = await tcs.Task.ConfigureAwait(false);
124+
var resolverResult = await tcs.Task;
125125
Assert.NotNull(resolverResult);
126126
Assert.True(resolverResult.ResolvedSuccessfully);
127127
Assert.Equal(2, resolverResult.EndpointSource.Endpoints.Count);
@@ -158,14 +158,14 @@ public async Task ResolveServiceEndpointOneShot()
158158
var resolver = services.GetRequiredService<ServiceEndpointResolver>();
159159

160160
Assert.NotNull(resolver);
161-
var initialResult = await resolver.GetEndpointsAsync("http://basket", CancellationToken.None).ConfigureAwait(false);
161+
var initialResult = await resolver.GetEndpointsAsync("http://basket", CancellationToken.None);
162162
Assert.NotNull(initialResult);
163163
var sep = Assert.Single(initialResult.Endpoints);
164164
var ip = Assert.IsType<IPEndPoint>(sep.EndPoint);
165165
Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address);
166166
Assert.Equal(8080, ip.Port);
167167

168-
await services.DisposeAsync().ConfigureAwait(false);
168+
await services.DisposeAsync();
169169
}
170170

171171
[Fact]
@@ -196,13 +196,13 @@ public async Task ResolveHttpServiceEndpointOneShot()
196196

197197
Assert.NotNull(resolver);
198198
var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://basket");
199-
var endpoint = await resolver.GetEndpointAsync(httpRequest, CancellationToken.None).ConfigureAwait(false);
199+
var endpoint = await resolver.GetEndpointAsync(httpRequest, CancellationToken.None);
200200
Assert.NotNull(endpoint);
201201
var ip = Assert.IsType<IPEndPoint>(endpoint.EndPoint);
202202
Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address);
203203
Assert.Equal(8080, ip.Port);
204204

205-
await services.DisposeAsync().ConfigureAwait(false);
205+
await services.DisposeAsync();
206206
}
207207

208208
[Fact]
@@ -242,7 +242,7 @@ public async Task ResolveServiceEndpoint_ThrowOnReload()
242242
await using ((watcher = watcherFactory.CreateWatcher("http://basket")).ConfigureAwait(false))
243243
{
244244
Assert.NotNull(watcher);
245-
var initialEndpointsTask = watcher.GetEndpointsAsync(CancellationToken.None).ConfigureAwait(false);
245+
var initialEndpointsTask = watcher.GetEndpointsAsync(CancellationToken.None);
246246
sem.Release(1);
247247
var initialEndpoints = await initialEndpointsTask;
248248
Assert.NotNull(initialEndpoints);
@@ -257,7 +257,7 @@ public async Task ResolveServiceEndpoint_ThrowOnReload()
257257
var resolveTask = watcher.GetEndpointsAsync(CancellationToken.None);
258258
sem.Release(1);
259259
await resolveTask.ConfigureAwait(false);
260-
}).ConfigureAwait(false);
260+
});
261261

262262
Assert.Equal("throwing", exception.Message);
263263

@@ -269,8 +269,8 @@ public async Task ResolveServiceEndpoint_ThrowOnReload()
269269
cts[0].Cancel();
270270
sem.Release(1);
271271
var resolveTask = watcher.GetEndpointsAsync(CancellationToken.None);
272-
await resolveTask.ConfigureAwait(false);
273-
var next = await channel.Reader.ReadAsync(CancellationToken.None).ConfigureAwait(false);
272+
await resolveTask;
273+
var next = await channel.Reader.ReadAsync(CancellationToken.None);
274274
if (next.ResolvedSuccessfully)
275275
{
276276
break;
@@ -279,7 +279,7 @@ public async Task ResolveServiceEndpoint_ThrowOnReload()
279279

280280
var task = watcher.GetEndpointsAsync(CancellationToken.None);
281281
sem.Release(1);
282-
var result = await task.ConfigureAwait(false);
282+
var result = await task;
283283
Assert.NotSame(initialEndpoints, result);
284284
var sep = Assert.Single(result.Endpoints);
285285
var ip = Assert.IsType<IPEndPoint>(sep.EndPoint);

0 commit comments

Comments
 (0)