Skip to content

Commit 775d1fb

Browse files
authored
Update various package versions (#2453)
1 parent 0ea0112 commit 775d1fb

File tree

16 files changed

+40
-29
lines changed

16 files changed

+40
-29
lines changed

Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
3131
</ItemGroup>
3232

33+
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
34+
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
35+
<Using Include="NUnit.Framework.Legacy" />
36+
<Using Include="NUnit.Framework" />
37+
</ItemGroup>
38+
3339
<!--
3440
Make a netstandard2.1 copy of the .net ILLinkPack to work around a trimming issue.
3541
See https://github.com/dotnet/linker/issues/3175

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@
5858
<!-- Other -->
5959
<PackageVersion Include="BenchmarkDotNet" Version="0.13.1" />
6060
<PackageVersion Include="CommandLineParser" Version="2.5.0" />
61-
<PackageVersion Include="Google.Api.CommonProtos" Version="2.13.0" />
61+
<PackageVersion Include="Google.Api.CommonProtos" Version="2.15.0" />
6262
<PackageVersion Include="Google.Apis.Auth" Version="1.46.0" />
63-
<PackageVersion Include="Google.Protobuf" Version="3.24.0" />
63+
<PackageVersion Include="Google.Protobuf" Version="3.27.0" />
6464
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
6565
<PackageVersion Include="Microsoft.Build.Locator" Version="1.5.5" />
6666
<PackageVersion Include="Microsoft.Build" Version="16.9.0" />
67-
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23472.1" />
67+
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
6868
<PackageVersion Include="Microsoft.Crank.EventSources" Version="0.2.0-alpha.21255.1" />
6969
<PackageVersion Include="Microsoft.Extensions.Logging.Testing" Version="2.1.1" />
70-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
70+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
7171
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
7272
<PackageVersion Include="Microsoft.Win32.Registry" Version="4.6.0" />
7373
<PackageVersion Include="Moq" Version="4.16.1" />
7474
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
75-
<PackageVersion Include="Nunit" Version="3.13.3" />
75+
<PackageVersion Include="Nunit" Version="4.1.0" />
7676
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
7777
<PackageVersion Include="protobuf-net.Grpc.AspNetCore" Version="1.0.140" />
7878
<PackageVersion Include="protobuf-net.Grpc" Version="1.0.140" />
@@ -81,7 +81,7 @@
8181
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
8282
<PackageVersion Include="System.IO.Pipelines" Version="5.0.1" />
8383
<PackageVersion Include="System.Memory" Version="4.5.3" />
84-
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="7.0.0" />
84+
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="8.0.0" />
8585
<PackageVersion Include="System.Security.Principal.Windows" Version="4.7.0" />
8686
<PackageVersion Include="System.Threading.Channels" Version="4.6.0" />
8787
</ItemGroup>

test/FunctionalTests/Balancer/DnsResolverTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public async Task RefreshAsync_MultipleCallsThenCancellation_CallCanceled()
275275
var dnsResolver = CreateDnsResolver(new Uri("dns:///localhost"));
276276
dnsResolver.Start(r =>
277277
{
278-
tcs.SetResult(r);
278+
tcs.TrySetResult(r);
279279
});
280280

281281
// Act
@@ -286,13 +286,19 @@ public async Task RefreshAsync_MultipleCallsThenCancellation_CallCanceled()
286286
Assert.Greater(result.Addresses!.Count, 0);
287287

288288
// Wait for the internal resolve task to be completed before triggering refresh again
289+
Logger.LogInformation("Wait for DNS resolver resolve task to complete.");
289290
await dnsResolver._resolveTask.DefaultTimeout();
291+
292+
Logger.LogInformation("Recreate TCS and refresh resolver again.");
290293
tcs = new TaskCompletionSource<ResolverResult>(TaskCreationOptions.RunContinuationsAsynchronously);
291294
dnsResolver.Refresh();
292295

296+
Logger.LogInformation("Dispose resolver while refresh is in progress. The refresh should be waiting for the min interval to complete.");
293297
dnsResolver.Dispose();
294298

295299
result = await tcs.Task.DefaultTimeout();
300+
301+
Logger.LogInformation("Received result from disposing resolver.");
296302
Assert.AreEqual(StatusCode.Unavailable, result.Status.StatusCode);
297303
Assert.AreEqual("Error getting DNS hosts for address 'localhost'. TaskCanceledException: A task was canceled.", result.Status.Detail);
298304
Assert.AreEqual("A task was canceled.", result.Status.DebugException!.Message);

test/FunctionalTests/Client/UnaryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region Copyright notice and license
1+
#region Copyright notice and license
22

33
// Copyright 2019 The gRPC Authors
44
//

test/FunctionalTests/Infrastructure/RequireHttp3Attribute.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region Copyright notice and license
1+
#region Copyright notice and license
22

33
// Copyright 2019 The gRPC Authors
44
//
@@ -16,6 +16,7 @@
1616

1717
#endregion
1818

19+
using System.Diagnostics.CodeAnalysis;
1920
using NUnit.Framework;
2021
using NUnit.Framework.Interfaces;
2122
using NUnit.Framework.Internal;
@@ -41,7 +42,7 @@ public void ApplyToTest(NUnit.Framework.Internal.Test test)
4142
test.Properties.Set(PropertyNames.SkipReason, message!);
4243
}
4344

44-
public static bool IsSupported(out string? message)
45+
public static bool IsSupported([NotNullWhen(false)] out string? message)
4546
{
4647
var osVersion = Environment.OSVersion;
4748
if (osVersion.Platform == PlatformID.Win32NT &&

test/Grpc.Core.Api.Tests/Grpc.Core.Api.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
3+
<TargetFrameworks>net462;net6.0</TargetFrameworks>
44
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66

test/Grpc.Core.Api.Tests/RpcExceptionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void DefaultMessageDoesntContainDebugExceptionStacktrace()
4848
var ex = new RpcException(new Status(StatusCode.Internal, "abc", someExceptionWithStacktrace));
4949
// Check debug exceptions's message is contained.
5050
StringAssert.Contains(someExceptionWithStacktrace.Message, ex.Message);
51-
StringAssert.Contains(someExceptionWithStacktrace.GetType().FullName, ex.Message);
51+
StringAssert.Contains(someExceptionWithStacktrace.GetType().FullName!, ex.Message);
5252
// If name of the current method is not in the message, it probably doesn't contain the stack trace.
5353
StringAssert.DoesNotContain(nameof(DefaultMessageDoesntContainDebugExceptionStacktrace), ex.Message);
5454
}

test/Grpc.Core.Api.Tests/VersionInfoTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ public void VersionInfoMatchesAssemblyProperties()
3232
var assemblyVersion = assembly!.GetName()!.Version!.ToString()!;
3333
Assert.AreEqual(VersionInfo.CurrentAssemblyVersion, assemblyVersion);
3434

35-
string assemblyFileVersion = FileVersionInfo.GetVersionInfo(assembly.Location)!.FileVersion;
35+
string assemblyFileVersion = FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion!;
3636
string assemblyFileVersionFromAttribute = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>()!.Version;
3737
Assert.AreEqual(VersionInfo.CurrentAssemblyFileVersion, assemblyFileVersion);
3838
Assert.AreEqual(VersionInfo.CurrentAssemblyFileVersion, assemblyFileVersionFromAttribute);
3939

40-
string productVersion = FileVersionInfo.GetVersionInfo(assembly.Location)!.ProductVersion;
40+
string productVersion = FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion!;
4141
string informationalVersionFromAttribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!.InformationalVersion;
4242
Assert.AreEqual(productVersion, informationalVersionFromAttribute);
4343
// grpc-dotnet appends commit SHA to the product version (e.g. "2.45.0-dev+e30038495bd26b812b6684049353c045d1049d3c")

test/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
3+
<TargetFrameworks>net462;net6.0</TargetFrameworks>
44
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
55
</PropertyGroup>
66

test/Grpc.Reflection.Tests/Grpc.Reflection.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net462;netcoreapp3.1</TargetFrameworks>
3+
<TargetFrameworks>net462;net6.0</TargetFrameworks>
44
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
55
</PropertyGroup>
66

0 commit comments

Comments
 (0)