Update Infrastructure (#961)

* Update form .NET Core 2.2 to .NET Core 3.1

- Global variable for projects
- Change TFMs from netcoreapp2.2 to netcoreapp3.1
- Update global.json
- Update build.json
- Remove direct framework cake TestCore task
- Update travis dotnet version
- Update azure pipline file
- Update vscode launch.json

* Add Central Package Management

* Fix xUnit Breaking Change for MemberData type

* Fix xUnit breaking change for duplicate test method name

* Fix Rang/Index type conflict with System.Rang/Index

* Update vscode tasks.json

* Change serviceHostExecutable path in ServiceTestDriver.cs

* Downgrade SDK version (https://github.com/appveyor/ci/issues/3440)

- Appveyor hasn't installed latest SDK therefore I downgrade it until they install it.

* Dump Microsoft.SqlServer.DACFx
This commit is contained in:
Soheil Alizadeh
2020-06-12 23:14:18 +04:30
committed by GitHub
parent c51a59dadf
commit 887a499d2b
62 changed files with 704 additions and 771 deletions

View File

@@ -1,40 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DebugType>portable</DebugType>
<AssemblyName>Microsoft.SqlTools.ServiceLayer.PerfTests</AssemblyName>
<OutputType>Exe</OutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<StartupObject>Microsoft.SqlTools.ServiceLayer.PerfTests.Program</StartupObject>
<PreserveCompilationContext>true</PreserveCompilationContext>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>../../bin/ref/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Moq">
<HintPath>../../bin/ref/Moq.dll</HintPath>
</Reference>
<Reference Include="Castle.Core">
<HintPath>../../bin/ref/Castle.Core.dll</HintPath>
</Reference>
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
<ProjectReference Include="../../src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj" />
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(TestProjectsTargetFramework)</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DebugType>portable</DebugType>
<AssemblyName>Microsoft.SqlTools.ServiceLayer.PerfTests</AssemblyName>
<OutputType>Exe</OutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
<StartupObject>Microsoft.SqlTools.ServiceLayer.PerfTests.Program</StartupObject>
<PreserveCompilationContext>true</PreserveCompilationContext>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
<ProjectReference Include="../../src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj" />
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
</Project>

View File

@@ -12,6 +12,7 @@ using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Xunit;
using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.PerfTests
{

View File

@@ -18,49 +18,49 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
[Fact]
public async Task QueryResultSummaryOnPremTest()
{
await QueryResultSummaryOnPremTest(TestServerType.OnPrem, Scripts.MasterBasicQuery);
await QueryResultSummaryOnPremTestCore(TestServerType.OnPrem, Scripts.MasterBasicQuery);
}
[Fact]
public async Task QueryResultFirstOnPremTest()
{
await QueryResultFirstOnPremTest(TestServerType.OnPrem, Scripts.MasterBasicQuery);
await QueryResultFirstOnPremTestCore(TestServerType.OnPrem, Scripts.MasterBasicQuery);
}
[Fact]
public async Task LongQueryResultSummaryOnPremTest()
{
await QueryResultSummaryOnPremTest(TestServerType.OnPrem, Scripts.MasterLongQuery);
await QueryResultSummaryOnPremTestCore(TestServerType.OnPrem, Scripts.MasterLongQuery);
}
[Fact]
public async Task LongQueryResultFirstOnPremTest()
{
await QueryResultFirstOnPremTest(TestServerType.OnPrem, Scripts.MasterLongQuery);
await QueryResultFirstOnPremTestCore(TestServerType.OnPrem, Scripts.MasterLongQuery);
}
[Fact]
public async Task QueryResultSummaryOnAzureTest()
{
await QueryResultSummaryOnPremTest(TestServerType.Azure, Scripts.MasterBasicQuery);
await QueryResultSummaryOnPremTestCore(TestServerType.Azure, Scripts.MasterBasicQuery);
}
[Fact]
public async Task QueryResultFirstOnAzureTest()
{
await QueryResultFirstOnPremTest(TestServerType.Azure, Scripts.MasterBasicQuery);
await QueryResultFirstOnPremTestCore(TestServerType.Azure, Scripts.MasterBasicQuery);
}
[Fact]
public async Task LongQueryResultSummaryOnAzureTest()
{
await QueryResultSummaryOnPremTest(TestServerType.Azure, Scripts.MasterLongQuery);
await QueryResultSummaryOnPremTestCore(TestServerType.Azure, Scripts.MasterLongQuery);
}
[Fact]
public async Task LongQueryResultFirstOnAzureTest()
{
await QueryResultFirstOnPremTest(TestServerType.Azure, Scripts.MasterLongQuery);
await QueryResultFirstOnPremTestCore(TestServerType.Azure, Scripts.MasterLongQuery);
}
[Fact]
@@ -103,7 +103,7 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
}
private async Task QueryResultSummaryOnPremTest(TestServerType serverType, string query, [CallerMemberName] string testName = "")
private async Task QueryResultSummaryOnPremTestCore(TestServerType serverType, string query, [CallerMemberName] string testName = "")
{
await TestServiceDriverProvider.RunTestIterations(async (timer) =>
{
@@ -124,7 +124,7 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
}, testName);
}
private async Task QueryResultFirstOnPremTest(TestServerType serverType, string query, [CallerMemberName] string testName = "")
private async Task QueryResultFirstOnPremTestCore(TestServerType serverType, string query, [CallerMemberName] string testName = "")
{
await TestServiceDriverProvider.RunTestIterations(async (timer) =>
{