Skip to content

Commit

Permalink
Bump the version of GRPC tested by default (in Windows) (#4542)
Browse files Browse the repository at this point in the history
The earlier version has (known) bugs which can cause flaky tests
  • Loading branch information
andrewlock authored Aug 24, 2023
1 parent 72613e0 commit f6a9428
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,10 @@ static void FixVerySlowClientSpans(IImmutableList<MockSpan> spans)
{
// There is a race condition in GRPC version < v2.43.0 that can cause ObjectDisposedException
// when a deadline is exceeded. Skip the test if we hit it: https://github.com/grpc/grpc-dotnet/pull/1550
if ((string.IsNullOrEmpty(packageVersion) || new Version(packageVersion) < new Version("2.43.0"))
&& processResult is not null
&& processResult.StandardError.Contains("ObjectDisposedException"))
if (!string.IsNullOrEmpty(packageVersion)
&& new Version(packageVersion) < new Version("2.43.0")
&& processResult is not null
&& processResult.StandardError.Contains("ObjectDisposedException"))
{
throw new SkipException("Hit race condition in GRPC deadline exceeded");
}
Expand Down Expand Up @@ -459,7 +460,7 @@ protected void RunIntegrationDisabled(string packageVersion)
{
// There is a race condition in GRPC version < v2.43.0 that can cause ObjectDisposedException
// when a deadline is exceeded. Skip the test if we hit it: https://github.com/grpc/grpc-dotnet/pull/1550
if ((string.IsNullOrEmpty(packageVersion) || new Version(packageVersion) < new Version("2.43.0"))
if ((!string.IsNullOrEmpty(packageVersion) && new Version(packageVersion) < new Version("2.43.0"))
&& processResult is not null
&& processResult.StandardError.Contains("ObjectDisposedException"))
{
Expand Down Expand Up @@ -489,8 +490,7 @@ protected void GuardArm64(string packageVersion)

protected bool IsSupportedVersion(string packageVersion)
{
return string.IsNullOrEmpty(packageVersion)
|| new Version(packageVersion) >= new Version("2.30.0");
return string.IsNullOrEmpty(packageVersion) || new Version(packageVersion) >= new Version("2.30.0");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Suppress warnings about lowercase variable names in generated code -->
<NoWarn>0618;NETSDK1138;CS8981</NoWarn>

<ApiVersion Condition="'$(ApiVersion)' == ''">2.32.0</ApiVersion>
<ApiVersion Condition="'$(ApiVersion)' == ''">2.43.0</ApiVersion>
<DefineConstants Condition="'$(ApiVersion)'&gt;='2.29.0'">$(DefineConstants);GRPC_2_29</DefineConstants>

<!-- Required to build multiple projects with the same Configuration|Platform, which is needed for the CI library/version matrix -->
Expand Down

0 comments on commit f6a9428

Please sign in to comment.