Skip to content

Commit

Permalink
ignore NU1605 error in all projects
Browse files Browse the repository at this point in the history
fix problem with new background worker in API
add new mstest small test project
upgrade 3rd party nugets
  • Loading branch information
angelovstanton committed Sep 15, 2018
1 parent 1cfe97b commit 1d86b12
Show file tree
Hide file tree
Showing 25 changed files with 194 additions and 116 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -299,3 +299,6 @@ __pycache__/
*.btm.cs
*.odx.cs
*.xsd.cs
/installers/Meissa.Windows64/content
/installers/Meissa.MacOS64/content
/installers/Meissa.Linux64/content
4 changes: 2 additions & 2 deletions LoadTestsProject.NUnit/LoadTestsProject.NUnit.csproj
Expand Up @@ -88,8 +88,8 @@
<Error Condition="!Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets'))" />
<Error Condition="!Exists('..\packages\Selenium.Chrome.WebDriver.2.40\build\Selenium.Chrome.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.Chrome.WebDriver.2.40\build\Selenium.Chrome.WebDriver.targets'))" />
<Error Condition="!Exists('..\packages\Selenium.Chrome.WebDriver.2.41\build\Selenium.Chrome.WebDriver.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Selenium.Chrome.WebDriver.2.41\build\Selenium.Chrome.WebDriver.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.3.2\build\net45\MSTest.TestAdapter.targets')" />
<Import Project="..\packages\Selenium.Chrome.WebDriver.2.40\build\Selenium.Chrome.WebDriver.targets" Condition="Exists('..\packages\Selenium.Chrome.WebDriver.2.40\build\Selenium.Chrome.WebDriver.targets')" />
<Import Project="..\packages\Selenium.Chrome.WebDriver.2.41\build\Selenium.Chrome.WebDriver.targets" Condition="Exists('..\packages\Selenium.Chrome.WebDriver.2.41\build\Selenium.Chrome.WebDriver.targets')" />
</Project>
4 changes: 2 additions & 2 deletions LoadTestsProject.NUnit/packages.config
Expand Up @@ -14,8 +14,8 @@ limitations under the License.
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net451" />
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net451" />
<package id="NUnit" version="3.10.1" targetFramework="net451" />
<package id="NUnit.ConsoleRunner" version="3.8.0" targetFramework="net451" />
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net451" />
<package id="NUnit3TestAdapter" version="3.10.0" targetFramework="net461" />
<package id="Selenium.Chrome.WebDriver" version="2.40" targetFramework="net451" />
<package id="Selenium.Chrome.WebDriver" version="2.41" targetFramework="net451" />
<package id="Selenium.WebDriver" version="3.14.0" targetFramework="net451" />
</packages>
2 changes: 1 addition & 1 deletion Meissa.API.Tests/Meissa.API.Tests.csproj
Expand Up @@ -24,7 +24,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.1.1" />
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="AutoFixture" Version="4.5.0" />
Expand Down
8 changes: 3 additions & 5 deletions Meissa.API/Controllers/TestCaseRunController.cs
Expand Up @@ -29,20 +29,18 @@ namespace Meissa.API.Controllers
public class TestCaseRunsController : Controller
{
private readonly IBackgroundTaskQueue _backgroundTaskQueue;
private readonly IServiceProvider _serviceProvider;

public TestCaseRunsController(IBackgroundTaskQueue backgroundTaskQueue, IServiceProvider serviceProvider)
public TestCaseRunsController(IBackgroundTaskQueue backgroundTaskQueue)
{
_backgroundTaskQueue = backgroundTaskQueue;
_serviceProvider = serviceProvider;
}

[HttpDelete]
public async Task<IActionResult> DeleteOlderTestCasesHistoryAsync()
{
_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
{
using (var scope = _serviceProvider.CreateScope())
using (var scope = _backgroundTaskQueue.CreateScope())
{
var meissaRepository = scope.ServiceProvider.GetRequiredService<MeissaRepository>();
var logger = scope.ServiceProvider.GetRequiredService<ILogger<TestCaseRunsController>>();
Expand Down Expand Up @@ -79,7 +77,7 @@ public async Task<IActionResult> UpdateTestCaseExecutionHistoryAsync([FromBody]
{
_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
{
using (var scope = _serviceProvider.CreateScope())
using (var scope = _backgroundTaskQueue.CreateScope())
{
var meissaRepository = scope.ServiceProvider.GetRequiredService<MeissaRepository>();
var logger = scope.ServiceProvider.GetRequiredService<ILogger<TestCaseRunsController>>();
Expand Down
7 changes: 4 additions & 3 deletions Meissa.API/Meissa.API.csproj
Expand Up @@ -18,13 +18,14 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1705;NU1603</NoWarn>
<NoWarn>1701;1702;1705;NU1603;NU1605</NoWarn>
<DocumentationFile>bin\Debug\netcoreapp2.0\Meissa.API.xml</DocumentationFile>
<Optimize>false</Optimize>
<WarningLevel>0</WarningLevel>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1705;NU1603;NU1605</NoWarn>
<DocumentationFile>bin\Release\netcoreapp2.0\Meissa.API.xml</DocumentationFile>
</PropertyGroup>

Expand All @@ -34,9 +35,9 @@

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.4" />
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.2.1" />
<PackageReference Include="AutoMapper" Version="7.0.1" />
Expand Down
13 changes: 13 additions & 0 deletions Meissa.API/Services/BackgroundTaskQueue.cs
Expand Up @@ -17,13 +17,26 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;

namespace Meissa.API.Services
{
public class BackgroundTaskQueue : IBackgroundTaskQueue
{
private ConcurrentQueue<Func<CancellationToken, Task>> _workItems = new ConcurrentQueue<Func<CancellationToken, Task>>();
private SemaphoreSlim _signal = new SemaphoreSlim(0);
private readonly IServiceProvider _serviceProvider;
public BackgroundTaskQueue(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}

public IServiceProvider ServiceProvider { get; set; }

public IServiceScope CreateScope()
{
return _serviceProvider.CreateScope();
}

public void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem)
{
Expand Down
3 changes: 3 additions & 0 deletions Meissa.API/Services/IBackgroundTaskQueue.cs
Expand Up @@ -16,6 +16,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;

namespace Meissa.API.Services
{
Expand All @@ -24,5 +25,7 @@ public interface IBackgroundTaskQueue
void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem);

Task<Func<CancellationToken, Task>> DequeueAsync(CancellationToken cancellationToken);

IServiceScope CreateScope();
}
}
Expand Up @@ -20,10 +20,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="AutoFixture" Version="4.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
Expand Down
4 changes: 2 additions & 2 deletions Meissa.Core.Services/Meissa.Core.Services.csproj
Expand Up @@ -22,8 +22,8 @@
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="FluentCommandLineParser-netstandard" Version="1.4.3.13" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.8.13" />
<PackageReference Include="Unity" Version="5.8.6" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.8.18" />
<PackageReference Include="Unity" Version="5.8.11" />
</ItemGroup>

<ItemGroup>
Expand Down
Expand Up @@ -19,13 +19,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="AutoFixture" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
Expand Down
21 changes: 18 additions & 3 deletions Meissa.Infrastructure/Meissa.Infrastructure.csproj
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
Expand All @@ -9,6 +9,20 @@
<PropertyGroup>
<CodeAnalysisRuleSet>$(SolutionDir)\StyleCopeRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn>1701;1702;1705;NU1603;NU1605</NoWarn>
<WarningsAsErrors />
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn>1701;1702;1705;NU1603;NU1605</NoWarn>
<Optimize>false</Optimize>
<WarningLevel>0</WarningLevel>
<WarningsAsErrors />
</PropertyGroup>

<ItemGroup>
<Compile Remove="TestTechnologySpecific\**" />
Expand All @@ -26,14 +40,15 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.1.1" />
<PackageReference Include="Mono.Cecil" Version="0.10.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="System.Composition" Version="1.2.0" />
<PackageReference Include="Unity" Version="5.8.6" />
<PackageReference Include="Unity" Version="5.8.11" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Meissa.Model/Meissa.Model.csproj
Expand Up @@ -19,13 +19,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.3" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final" />
</ItemGroup>

Expand Down
5 changes: 5 additions & 0 deletions Meissa.Plugins.MSTest/Meissa.Plugins.MSTest.csproj
Expand Up @@ -10,6 +10,11 @@
<PropertyGroup>
<CodeAnalysisRuleSet>$(SolutionDir)\StyleCopeRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(SolutionDir)\stylecop.json" Link="stylecop.json" />
Expand Down
5 changes: 5 additions & 0 deletions Meissa.Plugins.NUnit/Meissa.Plugins.NUnit.csproj
Expand Up @@ -11,6 +11,11 @@
<CodeAnalysisRuleSet>$(SolutionDir)\StyleCopeRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(SolutionDir)\stylecop.json" Link="stylecop.json" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions Meissa.Plugins.Protractor/Meissa.Plugins.Protractor.csproj
Expand Up @@ -10,6 +10,11 @@
<CodeAnalysisRuleSet>$(SolutionDir)\StyleCopeRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="$(SolutionDir)\stylecop.json" Link="stylecop.json" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Meissa.Tests.Factories/Meissa.Tests.Factories.csproj
Expand Up @@ -20,7 +20,7 @@

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.5.0" />
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
</ItemGroup>
Expand Down

0 comments on commit 1d86b12

Please sign in to comment.