Quarantine flaky Watch tests (#23855)
This commit is contained in:
parent
e370158348
commit
aee40dbd36
|
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
{
|
||||
"solution": {
|
||||
"path": "..\\..\\AspNetCore.sln",
|
||||
"projects" : [
|
||||
"src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj",
|
||||
"src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj",
|
||||
"projects": [
|
||||
"src\\Testing\\src\\Microsoft.AspNetCore.Testing.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-getdocument\\src\\dotnet-getdocument.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\\test\\dotnet-user-secrets.Tests.csproj",
|
||||
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj",
|
||||
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.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"
|
||||
"src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj",
|
||||
"src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ using System;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
|
|
@ -54,6 +55,7 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
|
||||
public async Task RunsWithNoRestoreOnOrdinaryFileChanges()
|
||||
{
|
||||
_app.DotnetWatchArgs.Add("--verbose");
|
||||
|
|
@ -71,10 +73,13 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
|
|||
var message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));
|
||||
|
||||
Assert.Equal(messagePrefix + " --no-restore -- wait", message.Trim());
|
||||
|
||||
await _app.HasRestarted();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
|
||||
public async Task RunsWithRestoreIfCsprojChanges()
|
||||
{
|
||||
_app.DotnetWatchArgs.Add("--verbose");
|
||||
|
|
@ -92,6 +97,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests
|
|||
// csproj changed. Do not expect a --no-restore
|
||||
Assert.Equal(messagePrefix + " -- wait", message.Trim());
|
||||
|
||||
await _app.HasRestarted();
|
||||
|
||||
// regular file changed after csproj changes. Should use --no-restore
|
||||
File.SetLastWriteTime(Path.Combine(_app.SourceDirectory, "Program.cs"), DateTime.Now);
|
||||
message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));
|
||||
|
|
|
|||
Loading…
Reference in New Issue