Move tests to net472
This commit is contained in:
parent
0a22b927b2
commit
3e08bf8833
|
|
@ -43,6 +43,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{85914BA9
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
build\dependencies.props = build\dependencies.props
|
build\dependencies.props = build\dependencies.props
|
||||||
build\Key.snk = build\Key.snk
|
build\Key.snk = build\Key.snk
|
||||||
|
build\repo.props = build\repo.props
|
||||||
|
build\sources.props = build\sources.props
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{AB6964C9-A7AF-4FAC-BEA1-C8A538EC989E}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{AB6964C9-A7AF-4FAC-BEA1-C8A538EC989E}"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
||||||
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
|
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
|
||||||
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview3-27008-03</MicrosoftNETCoreApp22PackageVersion>
|
<MicrosoftNETCoreApp22PackageVersion>2.2.0-preview3-27008-03</MicrosoftNETCoreApp22PackageVersion>
|
||||||
|
<MicrosoftNETFrameworkReferenceAssemblies>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssemblies>
|
||||||
<MicrosoftNetHttpHeadersPackageVersion>2.2.0-preview3-35457</MicrosoftNetHttpHeadersPackageVersion>
|
<MicrosoftNetHttpHeadersPackageVersion>2.2.0-preview3-35457</MicrosoftNetHttpHeadersPackageVersion>
|
||||||
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
||||||
<MicrosoftWin32RegistryPackageVersion>4.5.0</MicrosoftWin32RegistryPackageVersion>
|
<MicrosoftWin32RegistryPackageVersion>4.5.0</MicrosoftWin32RegistryPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
|
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
|
||||||
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
|
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
|
||||||
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
|
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
|
||||||
|
https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json;
|
||||||
</RestoreSources>
|
</RestoreSources>
|
||||||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
|
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
|
||||||
$(RestoreSources);
|
$(RestoreSources);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>
|
<DeveloperBuildTestTfms>netcoreapp2.2</DeveloperBuildTestTfms>
|
||||||
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
||||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms)</StandardTestTfms>
|
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms)</StandardTestTfms>
|
||||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net461</StandardTestTfms>
|
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">$(StandardTestTfms);net472</StandardTestTfms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -15,4 +15,9 @@
|
||||||
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
|
<PackageReference Include="xunit" Version="$(XunitPackageVersion)" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualStudioPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' ">
|
||||||
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNETFrameworkReferenceAssemblies)" PrivateAssets="All" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
|
||||||
var writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
|
var writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
|
||||||
Assert.True(writeTask.IsCanceled);
|
Assert.True(writeTask.IsCanceled);
|
||||||
context.Dispose();
|
context.Dispose();
|
||||||
#if NET461
|
#if NET472
|
||||||
// HttpClient retries the request because it didn't get a response.
|
// HttpClient retries the request because it didn't get a response.
|
||||||
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
||||||
cts = new CancellationTokenSource();
|
cts = new CancellationTokenSource();
|
||||||
|
|
@ -191,7 +191,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
|
||||||
var writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
|
var writeTask = context.Response.Body.WriteAsync(new byte[10], 0, 10, cts.Token);
|
||||||
Assert.True(writeTask.IsCanceled);
|
Assert.True(writeTask.IsCanceled);
|
||||||
context.Dispose();
|
context.Dispose();
|
||||||
#if NET461
|
#if NET472
|
||||||
// HttpClient retries the request because it didn't get a response.
|
// HttpClient retries the request because it didn't get a response.
|
||||||
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
||||||
cts = new CancellationTokenSource();
|
cts = new CancellationTokenSource();
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
|
||||||
var writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
|
var writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
|
||||||
Assert.True(writeTask.IsCanceled);
|
Assert.True(writeTask.IsCanceled);
|
||||||
context.Dispose();
|
context.Dispose();
|
||||||
#if NET461
|
#if NET472
|
||||||
// .NET HttpClient automatically retries a request if it does not get a response.
|
// .NET HttpClient automatically retries a request if it does not get a response.
|
||||||
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
||||||
cts = new CancellationTokenSource();
|
cts = new CancellationTokenSource();
|
||||||
|
|
@ -145,7 +145,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys.Listener
|
||||||
var writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
|
var writeTask = context.Response.SendFileAsync(AbsoluteFilePath, 0, null, cts.Token);
|
||||||
Assert.True(writeTask.IsCanceled);
|
Assert.True(writeTask.IsCanceled);
|
||||||
context.Dispose();
|
context.Dispose();
|
||||||
#if NET461
|
#if NET472
|
||||||
// .NET HttpClient automatically retries a request if it does not get a response.
|
// .NET HttpClient automatically retries a request if it does not get a response.
|
||||||
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
context = await server.AcceptAsync(Utilities.DefaultTimeout).Before(responseTask);
|
||||||
cts = new CancellationTokenSource();
|
cts = new CancellationTokenSource();
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
||||||
Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
|
Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
|
||||||
#if NETCOREAPP2_2 // WebHeaderCollection.GetValues() not available in CoreCLR.
|
#if NETCOREAPP2_2 // WebHeaderCollection.GetValues() not available in CoreCLR.
|
||||||
Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]);
|
Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]);
|
||||||
#elif NET461
|
#elif NET472
|
||||||
Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("WWW-Authenticate"));
|
Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("WWW-Authenticate"));
|
||||||
#else
|
#else
|
||||||
#error Target framework needs to be updated
|
#error Target framework needs to be updated
|
||||||
|
|
@ -113,7 +113,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
|
||||||
Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
|
Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]);
|
||||||
#if NETCOREAPP2_2 // WebHeaderCollection.GetValues() not available in CoreCLR.
|
#if NETCOREAPP2_2 // WebHeaderCollection.GetValues() not available in CoreCLR.
|
||||||
Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]);
|
Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]);
|
||||||
#elif NET461
|
#elif NET472
|
||||||
Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("Custom-Header1"));
|
Assert.Equal(new string[] { "custom1, and custom2", "custom3" }, response.Headers.GetValues("Custom-Header1"));
|
||||||
#else
|
#else
|
||||||
#error Target framework needs to be updated
|
#error Target framework needs to be updated
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue