From a53accfd75062fbec9072624f7cf814cd86f65ea Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 8 Mar 2019 11:32:02 -0800 Subject: [PATCH] [Helix] Reenable dotnet-watch on helix (#8258) --- .../dotnet-watch/test/DotNetWatcherTests.cs | 4 +++- src/Tools/dotnet-watch/test/GlobbingAppTests.cs | 16 +++++++++++----- src/Tools/dotnet-watch/test/NoDepsAppTests.cs | 7 +++++-- .../dotnet-watch/test/dotnet-watch.Tests.csproj | 3 +-- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs b/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs index 6b064e2a8e..1174aee79d 100644 --- a/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs +++ b/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Globalization; using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing.xunit; using Xunit; using Xunit.Abstractions; @@ -22,7 +23,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests _app = new KitchenSinkApp(logger); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task RunsWithDotnetWatchEnvVariable() { Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_WATCH")), "DOTNET_WATCH cannot be set already when this test is running"); diff --git a/src/Tools/dotnet-watch/test/GlobbingAppTests.cs b/src/Tools/dotnet-watch/test/GlobbingAppTests.cs index 3658261049..34c4b79d2d 100644 --- a/src/Tools/dotnet-watch/test/GlobbingAppTests.cs +++ b/src/Tools/dotnet-watch/test/GlobbingAppTests.cs @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing.xunit; using Microsoft.DotNet.Watcher.Tools.Tests; using Xunit; using Xunit.Abstractions; @@ -20,9 +21,10 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests _app = new GlobbingApp(logger); } - [Theory] + [ConditionalTheory] [InlineData(true)] [InlineData(false)] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task ChangeCompiledFile(bool usePollingWatcher) { _app.UsePollingWatcher = usePollingWatcher; @@ -40,7 +42,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests Assert.Equal(2, types); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task DeleteCompiledFile() { await _app.StartWatcherAsync(); @@ -56,7 +59,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests Assert.Equal(1, types); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task DeleteSourceFolder() { await _app.StartWatcherAsync(); @@ -84,7 +88,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests await _app.HasRestarted(); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task ChangeExcludedFile() { await _app.StartWatcherAsync(); @@ -97,7 +102,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests Assert.NotSame(restart, finished); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task ListsFiles() { await _app.PrepareAsync(); diff --git a/src/Tools/dotnet-watch/test/NoDepsAppTests.cs b/src/Tools/dotnet-watch/test/NoDepsAppTests.cs index 812f4ca755..e3cb61831b 100644 --- a/src/Tools/dotnet-watch/test/NoDepsAppTests.cs +++ b/src/Tools/dotnet-watch/test/NoDepsAppTests.cs @@ -5,6 +5,7 @@ using System; using System.Diagnostics; using System.IO; using System.Threading.Tasks; +using Microsoft.AspNetCore.Testing.xunit; using Xunit; using Xunit.Abstractions; @@ -23,7 +24,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests _output = logger; } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task RestartProcessOnFileChange() { await _app.StartWatcherAsync(new[] { "--no-exit" }); @@ -41,7 +43,8 @@ namespace Microsoft.DotNet.Watcher.Tools.FunctionalTests Assert.NotEqual(processIdentifier, processIdentifier2); } - [Fact] + [ConditionalFact] + [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 public async Task RestartProcessThatTerminatesAfterFileChange() { await _app.StartWatcherAsync(); diff --git a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj index c7414e6834..faab2020b0 100644 --- a/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj +++ b/src/Tools/dotnet-watch/test/dotnet-watch.Tests.csproj @@ -5,12 +5,11 @@ Microsoft.DotNet.Watcher.Tools.Tests $(DefaultItemExcludes);TestProjects\**\* DotNetWatcherToolsTests - - false +