Skip to content

Commit a53accf

Browse files
authored
[Helix] Reenable dotnet-watch on helix (#8258)
1 parent 2cf67cb commit a53accf

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.IO;
77
using System.Globalization;
88
using System.Threading.Tasks;
9+
using Microsoft.AspNetCore.Testing.xunit;
910
using Xunit;
1011
using Xunit.Abstractions;
1112

@@ -22,7 +23,8 @@ public DotNetWatcherTests(ITestOutputHelper logger)
2223
_app = new KitchenSinkApp(logger);
2324
}
2425

25-
[Fact]
26+
[ConditionalFact]
27+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
2628
public async Task RunsWithDotnetWatchEnvVariable()
2729
{
2830
Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_WATCH")), "DOTNET_WATCH cannot be set already when this test is running");

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Linq;
77
using System.Threading;
88
using System.Threading.Tasks;
9+
using Microsoft.AspNetCore.Testing.xunit;
910
using Microsoft.DotNet.Watcher.Tools.Tests;
1011
using Xunit;
1112
using Xunit.Abstractions;
@@ -20,9 +21,10 @@ public GlobbingAppTests(ITestOutputHelper logger)
2021
_app = new GlobbingApp(logger);
2122
}
2223

23-
[Theory]
24+
[ConditionalTheory]
2425
[InlineData(true)]
2526
[InlineData(false)]
27+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
2628
public async Task ChangeCompiledFile(bool usePollingWatcher)
2729
{
2830
_app.UsePollingWatcher = usePollingWatcher;
@@ -40,7 +42,8 @@ public async Task ChangeCompiledFile(bool usePollingWatcher)
4042
Assert.Equal(2, types);
4143
}
4244

43-
[Fact]
45+
[ConditionalFact]
46+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
4447
public async Task DeleteCompiledFile()
4548
{
4649
await _app.StartWatcherAsync();
@@ -56,7 +59,8 @@ public async Task DeleteCompiledFile()
5659
Assert.Equal(1, types);
5760
}
5861

59-
[Fact]
62+
[ConditionalFact]
63+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
6064
public async Task DeleteSourceFolder()
6165
{
6266
await _app.StartWatcherAsync();
@@ -84,7 +88,8 @@ public async Task RenameCompiledFile()
8488
await _app.HasRestarted();
8589
}
8690

87-
[Fact]
91+
[ConditionalFact]
92+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
8893
public async Task ChangeExcludedFile()
8994
{
9095
await _app.StartWatcherAsync();
@@ -97,7 +102,8 @@ public async Task ChangeExcludedFile()
97102
Assert.NotSame(restart, finished);
98103
}
99104

100-
[Fact]
105+
[ConditionalFact]
106+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
101107
public async Task ListsFiles()
102108
{
103109
await _app.PrepareAsync();

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

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

@@ -23,7 +24,8 @@ public NoDepsAppTests(ITestOutputHelper logger)
2324
_output = logger;
2425
}
2526

26-
[Fact]
27+
[ConditionalFact]
28+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
2729
public async Task RestartProcessOnFileChange()
2830
{
2931
await _app.StartWatcherAsync(new[] { "--no-exit" });
@@ -41,7 +43,8 @@ public async Task RestartProcessOnFileChange()
4143
Assert.NotEqual(processIdentifier, processIdentifier2);
4244
}
4345

44-
[Fact]
46+
[ConditionalFact]
47+
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267
4548
public async Task RestartProcessThatTerminatesAfterFileChange()
4649
{
4750
await _app.StartWatcherAsync();

src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
<AssemblyName>Microsoft.DotNet.Watcher.Tools.Tests</AssemblyName>
66
<DefaultItemExcludes>$(DefaultItemExcludes);TestProjects\**\*</DefaultItemExcludes>
77
<TestGroupName>DotNetWatcherToolsTests</TestGroupName>
8-
<!-- https://github.com/aspnet/AspNetCore/issues/6549 -->
9-
<BuildHelixPayload>false</BuildHelixPayload>
108
</PropertyGroup>
119

1210
<ItemGroup>
1311
<Compile Include="$(ToolSharedSourceRoot)TestHelpers\**\*.cs" />
12+
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
1413
<Content Include="TestProjects\**\*" CopyToOutputDirectory="PreserveNewest" />
1514
</ItemGroup>
1615

0 commit comments

Comments
 (0)