Skip to content

Commit

Permalink
Update Restsharp to most recent version in tests (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
nrcventura authored Mar 14, 2023
1 parent dcafa61 commit 9b6e49f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,17 @@

<!-- RestSharp -->
<ItemGroup>
<!-- This version is used to test against our minimum supported version called out in docs, and
to test a version older than 106.7.0 which uses different instrumentation code. -->
<PackageReference Include="RestSharp" Version="105.2.3" Condition="'$(TargetFramework)' == 'net462'" />
<!-- This version is used to test against versions greater than 106.7.0 and less than 107.0.0 to
test against the restsharp instrumentation for those versions. -->
<PackageReference Include="RestSharp" Version="106.15.0" Condition="'$(TargetFramework)' == 'net471'" />
<!-- Beginning with version 107.0.0 we rely on httpclient instrumentation to capture the appropriate
data from RestSharp usage. -->
<PackageReference Include="RestSharp" Version="107.3.0" Condition="'$(TargetFramework)' == 'net48'" />
<PackageReference Include="RestSharp" Version="108.0.3" Condition="'$(TargetFramework)' == 'net481'" />
<!-- Latest version of RestSharp to test against. Relies on HttpClient instrumentation. -->
<PackageReference Include="RestSharp" Version="109.0.1" Condition="'$(TargetFramework)' == 'net481'" />

<!-- Not testing these versions, but it simplfies the RestSharpExerciser class by not needing if directives -->
<PackageReference Include="RestSharp" Version="106.6.10" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ public async Task<string> RestSharpClientTaskCancelled(int port)
{
var options = new RestClientOptions($"http://{myHost}:{myPort}")
{
#if NET481
MaxTimeout = 1
#else
Timeout = 1
#endif
};
var client = new RestClient(options);

Expand Down

0 comments on commit 9b6e49f

Please sign in to comment.