Quarantine flaky Watch tests (#23855)

This commit is contained in:
Brennan 2020-07-10 15:34:10 -07:00 committed by GitHub
parent e370158348
commit aee40dbd36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 14 deletions

View File

@ -1,22 +1,23 @@
{ {
"solution": { "solution": {
"path": "..\\..\\AspNetCore.sln", "path": "..\\..\\AspNetCore.sln",
"projects" : [ "projects": [
"src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj", "src\\Testing\\src\\Microsoft.AspNetCore.Testing.csproj",
"src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj", "src\\Tools\\Extensions.ApiDescription.Client\\src\\Microsoft.Extensions.ApiDescription.Client.csproj",
"src\\Tools\\Extensions.ApiDescription.Client\\test\\Microsoft.Extensions.ApiDescription.Client.Tests.csproj",
"src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj",
"src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj",
"src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj",
"src\\Tools\\GetDocumentInsider\\src\\GetDocumentInsider.csproj",
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj",
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj",
"src\\Tools\\dotnet-dev-certs\\src\\dotnet-dev-certs.csproj", "src\\Tools\\dotnet-dev-certs\\src\\dotnet-dev-certs.csproj",
"src\\Tools\\dotnet-getdocument\\src\\dotnet-getdocument.csproj",
"src\\Tools\\dotnet-sql-cache\\src\\dotnet-sql-cache.csproj", "src\\Tools\\dotnet-sql-cache\\src\\dotnet-sql-cache.csproj",
"src\\Tools\\dotnet-user-secrets\\src\\dotnet-user-secrets.csproj", "src\\Tools\\dotnet-user-secrets\\src\\dotnet-user-secrets.csproj",
"src\\Tools\\dotnet-user-secrets\\test\\dotnet-user-secrets.Tests.csproj", "src\\Tools\\dotnet-user-secrets\\test\\dotnet-user-secrets.Tests.csproj",
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj", "src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj",
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj", "src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj"
"src\\Tools\\Extensions.ApiDescription.Client\\src\\Microsoft.Extensions.ApiDescription.Client.csproj",
"src\\Tools\\dotnet-getdocument\\src\\dotnet-getdocument.csproj",
"src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj",
"src\\Tools\\GetDocumentInsider\\src\\GetDocumentInsider.csproj",
"src\\Tools\\Extensions.ApiDescription.Client\\test\\Microsoft.Extensions.ApiDescription.Client.Tests.csproj",
"src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj",
"src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj"
] ]
} }
} }

View File

@ -5,6 +5,7 @@ using System;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Testing;
using Xunit; using Xunit;
using Xunit.Abstractions; using Xunit.Abstractions;
@ -54,6 +55,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
} }
[Fact] [Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
public async Task RunsWithNoRestoreOnOrdinaryFileChanges() public async Task RunsWithNoRestoreOnOrdinaryFileChanges()
{ {
_app.DotnetWatchArgs.Add("--verbose"); _app.DotnetWatchArgs.Add("--verbose");
@ -71,10 +73,13 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
var message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2)); var message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));
Assert.Equal(messagePrefix + " --no-restore -- wait", message.Trim()); Assert.Equal(messagePrefix + " --no-restore -- wait", message.Trim());
await _app.HasRestarted();
} }
} }
[Fact] [Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
public async Task RunsWithRestoreIfCsprojChanges() public async Task RunsWithRestoreIfCsprojChanges()
{ {
_app.DotnetWatchArgs.Add("--verbose"); _app.DotnetWatchArgs.Add("--verbose");
@ -92,6 +97,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
// csproj changed. Do not expect a --no-restore // csproj changed. Do not expect a --no-restore
Assert.Equal(messagePrefix + " -- wait", message.Trim()); Assert.Equal(messagePrefix + " -- wait", message.Trim());
await _app.HasRestarted();
// regular file changed after csproj changes. Should use --no-restore // regular file changed after csproj changes. Should use --no-restore
File.SetLastWriteTime(Path.Combine(_app.SourceDirectory, "Program.cs"), DateTime.Now); File.SetLastWriteTime(Path.Combine(_app.SourceDirectory, "Program.cs"), DateTime.Now);
message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2)); message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));