Skip to content

Commit aee40db

Browse files
Quarantine flaky Watch tests (#23855)
1 parent e370158 commit aee40db

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

src/Tools/Tools.slnf

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
{
1+
{
22
"solution": {
33
"path": "..\\..\\AspNetCore.sln",
4-
"projects" : [
5-
"src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj",
6-
"src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj",
4+
"projects": [
5+
"src\\Testing\\src\\Microsoft.AspNetCore.Testing.csproj",
6+
"src\\Tools\\Extensions.ApiDescription.Client\\src\\Microsoft.Extensions.ApiDescription.Client.csproj",
7+
"src\\Tools\\Extensions.ApiDescription.Client\\test\\Microsoft.Extensions.ApiDescription.Client.Tests.csproj",
8+
"src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj",
9+
"src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj",
10+
"src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj",
11+
"src\\Tools\\GetDocumentInsider\\src\\GetDocumentInsider.csproj",
12+
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj",
13+
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj",
714
"src\\Tools\\dotnet-dev-certs\\src\\dotnet-dev-certs.csproj",
15+
"src\\Tools\\dotnet-getdocument\\src\\dotnet-getdocument.csproj",
816
"src\\Tools\\dotnet-sql-cache\\src\\dotnet-sql-cache.csproj",
917
"src\\Tools\\dotnet-user-secrets\\src\\dotnet-user-secrets.csproj",
1018
"src\\Tools\\dotnet-user-secrets\\test\\dotnet-user-secrets.Tests.csproj",
11-
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj",
12-
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj",
13-
"src\\Tools\\Extensions.ApiDescription.Client\\src\\Microsoft.Extensions.ApiDescription.Client.csproj",
14-
"src\\Tools\\dotnet-getdocument\\src\\dotnet-getdocument.csproj",
15-
"src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj",
16-
"src\\Tools\\GetDocumentInsider\\src\\GetDocumentInsider.csproj",
17-
"src\\Tools\\Extensions.ApiDescription.Client\\test\\Microsoft.Extensions.ApiDescription.Client.Tests.csproj",
18-
"src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj",
19-
"src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj"
19+
"src\\Tools\\dotnet-watch\\src\\dotnet-watch.csproj",
20+
"src\\Tools\\dotnet-watch\\test\\dotnet-watch.Tests.csproj"
2021
]
2122
}
22-
}
23+
}

src/Tools/dotnet-watch/test/DotNetWatcherTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Globalization;
66
using System.IO;
77
using System.Threading.Tasks;
8+
using Microsoft.AspNetCore.Testing;
89
using Xunit;
910
using Xunit.Abstractions;
1011

@@ -54,6 +55,7 @@ public async Task RunsWithIterationEnvVariable()
5455
}
5556

5657
[Fact]
58+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
5759
public async Task RunsWithNoRestoreOnOrdinaryFileChanges()
5860
{
5961
_app.DotnetWatchArgs.Add("--verbose");
@@ -71,10 +73,13 @@ public async Task RunsWithNoRestoreOnOrdinaryFileChanges()
7173
var message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));
7274

7375
Assert.Equal(messagePrefix + " --no-restore -- wait", message.Trim());
76+
77+
await _app.HasRestarted();
7478
}
7579
}
7680

7781
[Fact]
82+
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/23854")]
7883
public async Task RunsWithRestoreIfCsprojChanges()
7984
{
8085
_app.DotnetWatchArgs.Add("--verbose");
@@ -92,6 +97,8 @@ public async Task RunsWithRestoreIfCsprojChanges()
9297
// csproj changed. Do not expect a --no-restore
9398
Assert.Equal(messagePrefix + " -- wait", message.Trim());
9499

100+
await _app.HasRestarted();
101+
95102
// regular file changed after csproj changes. Should use --no-restore
96103
File.SetLastWriteTime(Path.Combine(_app.SourceDirectory, "Program.cs"), DateTime.Now);
97104
message = await _app.Process.GetOutputLineStartsWithAsync(messagePrefix, TimeSpan.FromMinutes(2));

0 commit comments

Comments
 (0)