diff --git a/docs/Helix.md b/docs/Helix.md index 762f89dc2d68..6535bb59d43b 100644 --- a/docs/Helix.md +++ b/docs/Helix.md @@ -61,6 +61,6 @@ Most tests that don't just work on helix automatically are ones that depend on t ## How to skip tests on helix There are two main ways to opt out of helix - Skipping the entire test project via `false` in csproj (the default value for this is IsTestProject). -- Skipping an individual test via `[SkipOnHelix]` which might require including a compile reference to: `` +- Skipping an individual test via `[SkipOnHelix("url to github issue")]` which might require including a compile reference to: `` Make sure to file an issue for any skipped tests and include that in a comment next to either of these diff --git a/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs b/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs index 989d79d0129a..dee9dd3227fd 100644 --- a/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs +++ b/src/Analyzers/Analyzers/test/AnalyzerTestBase.cs @@ -51,7 +51,11 @@ private static string GetProjectDirectory() return AppContext.BaseDirectory; } +// This test code needs to be updated to support distributed testing. +// See https://github.com/aspnet/AspNetCore/issues/10422 +#pragma warning disable 0618 var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Analyzers"); +#pragma warning restore 0618 var projectDirectory = Path.Combine(solutionDirectory, "Analyzers", "test"); return projectDirectory; } diff --git a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj index f80356e535f7..258da0973862 100644 --- a/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj +++ b/src/Analyzers/Analyzers/test/Microsoft.AspNetCore.Analyzers.Test.csproj @@ -6,7 +6,7 @@ Microsoft.AspNetCore.Analyzers - + false diff --git a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs index 53597ad89325..1817a4c302ea 100644 --- a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs +++ b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs @@ -21,7 +21,7 @@ public RuntimeDependenciesResolverTest(ITestOutputHelper output) } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10426")] public void FindsReferenceAssemblyGraph_ForStandaloneApp() { // Arrange diff --git a/src/Components/Components/test/RendererTest.cs b/src/Components/Components/test/RendererTest.cs index c15d1d9bac45..be4994a83b51 100644 --- a/src/Components/Components/test/RendererTest.cs +++ b/src/Components/Components/test/RendererTest.cs @@ -2577,7 +2577,7 @@ public void CanTriggerRenderingSynchronouslyFromInsideAfterRenderCallback() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7487 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7487")] public async Task CanTriggerEventHandlerDisposedInEarlierPendingBatchAsync() { // This represents the scenario where the same event handler is being triggered diff --git a/src/DataProtection/Extensions/test/DataProtectionProviderTests.cs b/src/DataProtection/Extensions/test/DataProtectionProviderTests.cs index 9006c778c71f..65c542f49960 100644 --- a/src/DataProtection/Extensions/test/DataProtectionProviderTests.cs +++ b/src/DataProtection/Extensions/test/DataProtectionProviderTests.cs @@ -117,7 +117,7 @@ public void System_UsesProvidedDirectory_WithConfigurationCallback() [ConditionalFact] [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2177", FlakyOn.AzP.Windows)] [X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public void System_UsesProvidedDirectoryAndCertificate() { var filePath = Path.Combine(GetTestFilesPath(), "TestCert.pfx"); @@ -167,7 +167,7 @@ public void System_UsesProvidedDirectoryAndCertificate() [ConditionalFact] [X509StoreIsAvailable(StoreName.My, StoreLocation.CurrentUser)] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public void System_UsesProvidedCertificateNotFromStore() { using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser)) diff --git a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj index 416f78e75c83..6da74488a48e 100644 --- a/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj +++ b/src/DefaultBuilder/test/Microsoft.AspNetCore.FunctionalTests/Microsoft.AspNetCore.FunctionalTests.csproj @@ -4,7 +4,7 @@ netcoreapp3.0 - + false diff --git a/src/Hosting/Hosting/test/WebHostTests.cs b/src/Hosting/Hosting/test/WebHostTests.cs index 5d3e7139c7aa..3d4a67b0769e 100644 --- a/src/Hosting/Hosting/test/WebHostTests.cs +++ b/src/Hosting/Hosting/test/WebHostTests.cs @@ -199,7 +199,7 @@ public async Task WebHostShutsDownWhenTokenTriggers() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7291 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7291")] public async Task WebHostStopAsyncUsesDefaultTimeoutIfGivenTokenDoesNotFire() { var data = new Dictionary @@ -315,7 +315,7 @@ public async Task WebHostStopAsyncCanBeCancelledEarly() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7291 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7291")] public void WebHostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown() { using (var host = CreateBuilder() diff --git a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj index 1c92dddbaa4f..7a273f333d29 100644 --- a/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj +++ b/src/Hosting/test/FunctionalTests/Microsoft.AspNetCore.Hosting.FunctionalTests.csproj @@ -4,7 +4,7 @@ netcoreapp3.0 - + false diff --git a/src/Hosting/test/FunctionalTests/ShutdownTests.cs b/src/Hosting/test/FunctionalTests/ShutdownTests.cs index 0d7210cd0dcf..7e6124e146e2 100644 --- a/src/Hosting/test/FunctionalTests/ShutdownTests.cs +++ b/src/Hosting/test/FunctionalTests/ShutdownTests.cs @@ -49,8 +49,11 @@ private async Task ExecuteShutdownTest(string testName, string shutdownMechanic) { var logger = loggerFactory.CreateLogger(testName); +// https://github.com/aspnet/AspNetCore/issues/8247 +#pragma warning disable 0618 var applicationPath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("Hosting"), "test", "testassets", "Microsoft.AspNetCore.Hosting.TestSites"); +#pragma warning restore 0618 var deploymentParameters = new DeploymentParameters( applicationPath, diff --git a/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs b/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs index 88988a779e41..216cf1cff96d 100644 --- a/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs +++ b/src/Hosting/test/FunctionalTests/WebHostBuilderTests.cs @@ -28,7 +28,10 @@ public async Task InjectedStartup_DefaultApplicationNameIsEntryAssembly(TestVari { var logger = loggerFactory.CreateLogger(nameof(InjectedStartup_DefaultApplicationNameIsEntryAssembly)); +// https://github.com/aspnet/AspNetCore/issues/8247 +#pragma warning disable 0618 var applicationPath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("Hosting"), "test", "testassets", "IStartupInjectionAssemblyName"); +#pragma warning restore 0618 var deploymentParameters = new DeploymentParameters(variant) { diff --git a/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureSigningCredentialsTests.cs b/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureSigningCredentialsTests.cs index 40a22ff1a710..0fb9d68e00f1 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureSigningCredentialsTests.cs +++ b/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureSigningCredentialsTests.cs @@ -22,8 +22,8 @@ public class ConfigureSigningCredentialsTests UnsafeEphemeralKeySet : (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? X509KeyStorageFlags.PersistKeySet : X509KeyStorageFlags.DefaultKeySet); - [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [ConditionalFact] + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] [FrameworkSkipCondition(RuntimeFrameworks.CLR)] public void Configure_AddsDevelopmentKeyFromConfiguration() { @@ -64,7 +64,7 @@ public void Configure_AddsDevelopmentKeyFromConfiguration() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public void Configure_LoadsPfxCertificateCredentialFromConfiguration() { // Arrange @@ -94,7 +94,7 @@ public void Configure_LoadsPfxCertificateCredentialFromConfiguration() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public void Configure_LoadsCertificateStoreCertificateCredentialFromConfiguration() { try diff --git a/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/SigningKeysLoaderTests.cs b/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/SigningKeysLoaderTests.cs index 8551f9ccae6d..20bd91c88fed 100644 --- a/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/SigningKeysLoaderTests.cs +++ b/src/Identity/ApiAuthorization.IdentityServer/test/Configuration/SigningKeysLoaderTests.cs @@ -24,7 +24,7 @@ public class SigningKeysLoaderTests [Fact] public void LoadFromFile_ThrowsIfFileDoesNotExist() { - // Arrange, Act & Assert + // Arrange, Act & Assert var exception = Assert.Throws(() => SigningKeysLoader.LoadFromFile("./nonexisting.pfx", "", DefaultFlags)); Assert.Equal($"There was an error loading the certificate. The file './nonexisting.pfx' was not found.", exception.Message); } @@ -58,8 +58,8 @@ public static void LoadFromStoreCert_ThrowsIfThereIsNoCertificateAvailable() Assert.Equal("Couldn't find a valid certificate with subject 'Invalid' on the 'CurrentUser\\My'", exception.Message); } - [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [ConditionalFact] + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public static void LoadFromStoreCert_SkipsCertificatesNotYetValid() { try @@ -81,8 +81,8 @@ public static void LoadFromStoreCert_SkipsCertificatesNotYetValid() } } - [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [ConditionalFact] + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public static void LoadFromStoreCert_PrefersCertificatesCloserToExpirationDate() { try @@ -104,8 +104,8 @@ public static void LoadFromStoreCert_PrefersCertificatesCloserToExpirationDate() } } - [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6720 + [ConditionalFact] + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6720")] public static void LoadFromStoreCert_SkipsExpiredCertificates() { try diff --git a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj index 8bb04bbf54cf..1c0e5a12a189 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj +++ b/src/Middleware/CORS/test/FunctionalTests/CORS.FunctionalTests.csproj @@ -6,7 +6,7 @@ $(DefaultItemExcludes);node_modules\**\* - + false diff --git a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs index 717f67a07fbc..2990bd53a939 100644 --- a/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs +++ b/src/Middleware/CORS/test/FunctionalTests/CorsMiddlewareFunctionalTest.cs @@ -68,7 +68,10 @@ public async Task RunClientTests(string startup) private static async Task CreateDeployments(ILoggerFactory loggerFactory, string startup) { + // https://github.com/aspnet/AspNetCore/issues/7990 +#pragma warning disable 0618 var solutionPath = TestPathUtilities.GetSolutionRootDirectory("Middleware"); +#pragma warning restore 0618 var configuration = #if RELEASE diff --git a/src/MusicStore/test/MusicStore.E2ETests/Common/Helpers.cs b/src/MusicStore/test/MusicStore.E2ETests/Common/Helpers.cs index 954cb9dea5b7..eb761e21a597 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/Common/Helpers.cs +++ b/src/MusicStore/test/MusicStore.E2ETests/Common/Helpers.cs @@ -9,7 +9,10 @@ public class Helpers { public static string GetApplicationPath() { + // https://github.com/aspnet/AspNetCore/issues/8343 +#pragma warning disable 0618 var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("MusicStore"); +#pragma warning restore 0618 return Path.GetFullPath(Path.Combine(solutionDirectory, "samples", "MusicStore")); } diff --git a/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj b/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj index 5a2d81e39441..affbb20ef387 100644 --- a/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj +++ b/src/MusicStore/test/MusicStore.E2ETests/MusicStore.E2ETests.csproj @@ -9,7 +9,7 @@ $(WarningsNotAsErrors);xUnit1004 $(NoWarn);NU1605 - + false false false diff --git a/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs b/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs index 89f141ef9563..8b304a0f946c 100644 --- a/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs +++ b/src/Mvc/Mvc.Analyzers/test/Infrastructure/MvcTestSource.cs @@ -27,13 +27,16 @@ public static TestSource Read(string testClassName, string testMethod) private static string GetProjectDirectory() { - // On helix we use the published test files + // On helix we use the published test files if (SkipOnHelixAttribute.OnHelix()) { return AppContext.BaseDirectory; } +// https://github.com/aspnet/AspNetCore/issues/9431 +#pragma warning disable 0618 var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Mvc"); +#pragma warning restore 0618 var projectDirectory = Path.Combine(solutionDirectory, "Mvc.Analyzers", "test"); return projectDirectory; } diff --git a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj index df8a4a4cb0b5..45e91c37fa86 100644 --- a/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj +++ b/src/Mvc/Mvc.Analyzers/test/Mvc.Analyzers.Test.csproj @@ -6,7 +6,7 @@ Microsoft.AspNetCore.Mvc.Analyzers - + false diff --git a/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs b/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs index fb20bd8cbf86..6548f4306ba2 100644 --- a/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs +++ b/src/Mvc/Mvc.Api.Analyzers/test/Infrastructure/MvcTestSource.cs @@ -27,13 +27,16 @@ public static TestSource Read(string testClassName, string testMethod) private static string GetProjectDirectory() { - // On helix we use the published test files + // On helix we use the published test files if (SkipOnHelixAttribute.OnHelix()) { return AppContext.BaseDirectory; } +// https://github.com/aspnet/AspNetCore/issues/9431 +#pragma warning disable 0618 var solutionDirectory = TestPathUtilities.GetSolutionRootDirectory("Mvc"); +#pragma warning restore 0618 var projectDirectory = Path.Combine(solutionDirectory, "Mvc.Api.Analyzers", "test"); return projectDirectory; } diff --git a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj index 370646fc2b93..973a616c58ef 100644 --- a/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj +++ b/src/Mvc/Mvc.Api.Analyzers/test/Mvc.Api.Analyzers.Test.csproj @@ -5,7 +5,7 @@ Microsoft.AspNetCore.Mvc.Api.Analyzers - + false diff --git a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/ResourceFile.cs b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/ResourceFile.cs index 97c51a0d6ec5..013847e6838e 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/ResourceFile.cs +++ b/src/Mvc/test/Mvc.FunctionalTests/Infrastructure/ResourceFile.cs @@ -191,7 +191,11 @@ public static void UpdateFile(Assembly assembly, string resourceName, string pre { // The build system compiles every file under the resources folder as a resource available at runtime // with the same name as the file name. Need to update this file on disc. + +// https://github.com/aspnet/AspNetCore/issues/10423 +#pragma warning disable 0618 var solutionPath = TestPathUtilities.GetSolutionRootDirectory("Mvc"); +#pragma warning restore 0618 var projectPath = Path.Combine(solutionPath, "test", assembly.GetName().Name); var fullPath = Path.Combine(projectPath, resourceName); WriteFile(fullPath, content); diff --git a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj index 2a8c7e0504c3..51388a1c391b 100644 --- a/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj +++ b/src/Mvc/test/Mvc.FunctionalTests/Microsoft.AspNetCore.Mvc.FunctionalTests.csproj @@ -9,7 +9,7 @@ Mvc.FunctionalTests false - + false diff --git a/src/Security/Authentication/test/SecureDataFormatTests.cs b/src/Security/Authentication/test/SecureDataFormatTests.cs index 4a821ca2db9a..9ff1c2672858 100644 --- a/src/Security/Authentication/test/SecureDataFormatTests.cs +++ b/src/Security/Authentication/test/SecureDataFormatTests.cs @@ -49,7 +49,7 @@ public void ProtectWithPurposeRoundTrips() } [ConditionalFact] - [SkipOnHelix] + [SkipOnHelix("https://github.com/aspnet/AspNetCore-Internal/issues/1974")] public void UnprotectWithDifferentPurposeFails() { var provider = ServiceProvider.GetRequiredService(); diff --git a/src/Servers/IIS/IIS/benchmarks/IIS.Performance/StartupTimeBenchmark.cs b/src/Servers/IIS/IIS/benchmarks/IIS.Performance/StartupTimeBenchmark.cs index b1da8f10938d..3cb8d3a1c80a 100644 --- a/src/Servers/IIS/IIS/benchmarks/IIS.Performance/StartupTimeBenchmark.cs +++ b/src/Servers/IIS/IIS/benchmarks/IIS.Performance/StartupTimeBenchmark.cs @@ -20,11 +20,15 @@ public class StartupTimeBenchmark [IterationSetup] public void Setup() { +// Deployers do not work in distributed environments +// see https://github.com/aspnet/AspNetCore/issues/10268 and https://github.com/aspnet/Extensions/issues/1697 +#pragma warning disable 0618 var deploymentParameters = new DeploymentParameters(Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "test/testassets/InProcessWebSite"), ServerType.IISExpress, RuntimeFlavor.CoreClr, RuntimeArchitecture.x64) { +#pragma warning restore 0618 ServerConfigTemplateContent = File.ReadAllText("IISExpress.config"), SiteName = "HttpTestSite", TargetFramework = "netcoreapp2.1", diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs index d55fc4bf4b3a..009ecd8319c2 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess/StartupTests.cs @@ -113,8 +113,7 @@ public async Task StartsWithDotnetOnThePath(string path) [SkipIfNotAdmin] [RequiresNewShim] [RequiresIIS(IISCapability.PoolEnvironmentVariables)] - [SkipOnHelix] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2221", FlakyOn.Helix.All)] + [SkipOnHelix("https://github.com/aspnet/AspNetCore-Internal/issues/2221")] public async Task StartsWithDotnetInstallLocation(RuntimeArchitecture runtimeArchitecture) { var deploymentParameters = Fixture.GetBaseDeploymentParameters(); diff --git a/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedApplicationPublisher.cs b/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedApplicationPublisher.cs index 3e098189335e..d9aac2dac5c3 100644 --- a/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedApplicationPublisher.cs +++ b/src/Servers/IIS/IIS/test/Common.FunctionalTests/PublishedApplicationPublisher.cs @@ -42,7 +42,11 @@ public override Task Publish(DeploymentParameters deployme private string GetProjectReferencePublishLocation(DeploymentParameters deploymentParameters) { +// Deployers do not work in distributed environments +// see https://github.com/aspnet/AspNetCore/issues/10268 and https://github.com/aspnet/Extensions/issues/1697 +#pragma warning disable 0618 var testAssetsBasePath = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "IIS", "test", "testassets", _applicationName); +#pragma warning restore 0618 var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute().Configuration; var path = Path.Combine(testAssetsBasePath, "bin", configuration, deploymentParameters.TargetFramework, "publish", GetProfileName(deploymentParameters)); return path; diff --git a/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/MofFileTests.cs b/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/MofFileTests.cs index 8cc6e8c9acc4..df0e8678542d 100644 --- a/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/MofFileTests.cs +++ b/src/Servers/IIS/IIS/test/IIS.Shared.FunctionalTests/MofFileTests.cs @@ -15,11 +15,14 @@ public class MofFileTests [ConditionalFact] [OSSkipCondition(OperatingSystems.Linux | OperatingSystems.MacOSX)] [RequiresIIS(IISCapability.TracingModule)] - [Flaky("https://github.com/aspnet/AspNetCore-Internal/issues/2222", FlakyOn.Helix.All)] - [SkipOnHelix] + [SkipOnHelix("https://github.com/aspnet/AspNetCore-Internal/issues/2222")] public void CheckMofFile() { +// This test code needs to be updated to support distributed testing. +// See https://github.com/aspnet/AspNetCore-Internal/issues/2222 +#pragma warning disable 0618 var path = Path.Combine(TestPathUtilities.GetSolutionRootDirectory("IISIntegration"), "aspnetcoremodulev2", "aspnetcore", "ancm.mof"); +#pragma warning restore 0618 var process = Process.Start("mofcomp.exe", path); process.WaitForExit(); Assert.Equal(0, process.ExitCode); diff --git a/src/Servers/Kestrel/test/BindTests/AddressRegistrationTests.cs b/src/Servers/Kestrel/test/BindTests/AddressRegistrationTests.cs index 654b7b6fea76..79c436a4ca76 100644 --- a/src/Servers/Kestrel/test/BindTests/AddressRegistrationTests.cs +++ b/src/Servers/Kestrel/test/BindTests/AddressRegistrationTests.cs @@ -34,7 +34,7 @@ public class AddressRegistrationTests : TestApplicationErrorLoggerLoggedTest [ConditionalFact] [HostNameIsReachable] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7267 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7267")] public async Task RegisterAddresses_HostName_Success() { var hostName = Dns.GetHostName(); @@ -335,7 +335,7 @@ public async Task ListenAnyIP_IPv6_Success() [ConditionalFact] [HostNameIsReachable] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7267 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7267")] public async Task ListenAnyIP_HostName_Success() { var hostName = Dns.GetHostName(); diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs index 3c392b00ce82..59cfbbc2c958 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 { [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")] - [SkipOnHelix(Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)] public class HandshakeTests : LoggedTest { diff --git a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs index 9175c4cf79bb..3e587da067e4 100644 --- a/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs +++ b/src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs @@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2 { [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)] - [SkipOnHelix(Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 public class ShutdownTests : TestApplicationErrorLoggerLoggedTest { private static X509Certificate2 _x509Certificate2 = TestResources.GetTestCertificate(); @@ -43,7 +43,7 @@ public ShutdownTests() } [ConditionalFact] - [SkipOnHelix(Queues = "Fedora.28.Amd64.Open")] // https://github.com/aspnet/AspNetCore/issues/9985 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/9985", Queues = "Fedora.28.Amd64.Open")] // https://github.com/aspnet/AspNetCore/issues/9985 [Flaky("https://github.com/aspnet/AspNetCore/issues/9985", FlakyOn.All)] public async Task GracefulShutdownWaitsForRequestsToFinish() { diff --git a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs index a0214a49d0c0..283d0c2e2def 100644 --- a/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs +++ b/src/Servers/Kestrel/test/InMemory.FunctionalTests/Http2/TlsTests.cs @@ -30,7 +30,7 @@ public class TlsTests : LoggedTest private static X509Certificate2 _x509Certificate2 = TestResources.GetTestCertificate(); [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/7000 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/7000 ")] public async Task TlsHandshakeRejectsTlsLessThan12() { using (var server = new TestServer(context => diff --git a/src/Servers/Kestrel/test/Interop.FunctionalTests/H2SpecTests.cs b/src/Servers/Kestrel/test/Interop.FunctionalTests/H2SpecTests.cs index 3e1636490a75..98dd378202a8 100644 --- a/src/Servers/Kestrel/test/Interop.FunctionalTests/H2SpecTests.cs +++ b/src/Servers/Kestrel/test/Interop.FunctionalTests/H2SpecTests.cs @@ -21,7 +21,7 @@ namespace Interop.FunctionalTests [OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")] [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81, SkipReason = "Missing Windows ALPN support: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation#Support")] - [SkipOnHelix(Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2 public class H2SpecTests : LoggedTest { [ConditionalTheory] diff --git a/src/Shared/test/SkipOnHelixAttribute.cs b/src/Shared/test/SkipOnHelixAttribute.cs index 2ad4018accab..e1a74467bc70 100644 --- a/src/Shared/test/SkipOnHelixAttribute.cs +++ b/src/Shared/test/SkipOnHelixAttribute.cs @@ -12,6 +12,17 @@ namespace Microsoft.AspNetCore.Testing.xunit [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)] public class SkipOnHelixAttribute : Attribute, ITestCondition { + public SkipOnHelixAttribute(string issueUrl) + { + if (string.IsNullOrEmpty(issueUrl)) + { + throw new ArgumentException(); + } + IssueUrl = issueUrl; + } + + public string IssueUrl { get; } + public bool IsMet { get @@ -33,7 +44,7 @@ public string SkipReason } public static bool OnHelix() => !string.IsNullOrEmpty(GetTargetHelixQueue()); - + public static string GetTargetHelixQueue() => Environment.GetEnvironmentVariable("helix"); } } diff --git a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs index e1849607d3b1..b5cf8cfaa2e6 100644 --- a/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs +++ b/src/Tools/FirstRunCertGenerator/test/CertificateManagerTests.cs @@ -109,7 +109,7 @@ public void EnsureCreateHttpsCertificate_CreatesACertificate_WhenThereAreNoHttps } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6721 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/6721")] public void EnsureCreateHttpsCertificate2_CreatesACertificate_WhenThereAreNoHttpsCertificates() { try diff --git a/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs b/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs index 34cc22373f8c..5eb12ccb1923 100644 --- a/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs +++ b/src/Tools/dotnet-watch/test/DotNetWatcherTests.cs @@ -24,7 +24,7 @@ public DotNetWatcherTests(ITestOutputHelper logger) } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 + [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 c964bfe8c015..f85ef3bfcfe0 100644 --- a/src/Tools/dotnet-watch/test/GlobbingAppTests.cs +++ b/src/Tools/dotnet-watch/test/GlobbingAppTests.cs @@ -87,7 +87,7 @@ public async Task RenameCompiledFile() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/8267")] public async Task ChangeExcludedFile() { await _app.StartWatcherAsync(); @@ -101,7 +101,7 @@ public async Task ChangeExcludedFile() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 + [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 29c2ed873903..eb5bd6ff7ee6 100644 --- a/src/Tools/dotnet-watch/test/NoDepsAppTests.cs +++ b/src/Tools/dotnet-watch/test/NoDepsAppTests.cs @@ -44,7 +44,7 @@ public async Task RestartProcessOnFileChange() } [ConditionalFact] - [SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/8267 + [SkipOnHelix("https://github.com/aspnet/AspNetCore/issues/8267")] public async Task RestartProcessThatTerminatesAfterFileChange() { await _app.StartWatcherAsync();