diff --git a/pwiz_tools/Skyline/TestFunctional/ToolServiceTest.cs b/pwiz_tools/Skyline/TestFunctional/ToolServiceTest.cs index 156fcbcde9..d3cf9c7ee9 100644 --- a/pwiz_tools/Skyline/TestFunctional/ToolServiceTest.cs +++ b/pwiz_tools/Skyline/TestFunctional/ToolServiceTest.cs @@ -52,6 +52,12 @@ public void TestToolService() private const int MAX_TEST_ATTEMPTS = 2; protected override void DoTest() { + if (SkipTestToolService) // This test is flaky on certain machines, avoid gumming up the logs + { + Console.Write(MSG_SKIPPING_TEST_TOOL_SERVICE); // Log this via console for TestRunner + return; + } + List accumulatedExceptions = new List(); for (int attemptNumber = 0; attemptNumber < MAX_TEST_ATTEMPTS; attemptNumber++) { diff --git a/pwiz_tools/Skyline/TestUtil/AbstractUnitTest.cs b/pwiz_tools/Skyline/TestUtil/AbstractUnitTest.cs index 06ae6cd7c3..8e66448325 100644 --- a/pwiz_tools/Skyline/TestUtil/AbstractUnitTest.cs +++ b/pwiz_tools/Skyline/TestUtil/AbstractUnitTest.cs @@ -121,6 +121,12 @@ protected bool RunSmallMoleculeTestVersions set { TestContext.Properties["RunSmallMoleculeTestVersions"] = value.ToString(CultureInfo.InvariantCulture); } } + /// + /// Controls whether or not certain machines run the often flaky TestToolService + /// + protected bool SkipTestToolService => Environment.MachineName.Equals(@"BRENDANX-UW7"); + public const string MSG_SKIPPING_TEST_TOOL_SERVICE = @"AbstractUnitTest.SkipTestToolService is set for this machine, no test was actually performed"; + /// /// Perf tests (long running, huge-data-downloading) should be declared /// in the TestPerf namespace so that they can be skipped when the RunPerfTests