Skip to content

Commit fd20590

Browse files
committed
Skip flaky Linux tests which depend on help system
1 parent ccba0d3 commit fd20590

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/PowerShellEditorServices/Utility/VersionUtils.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ internal static class VersionUtils
5050
public static bool IsPS7OrGreater { get; } = PSVersion.Major >= 7;
5151

5252
/// <summary>
53-
/// True if we are running in on Windows, false otherwise.
53+
/// True if we are running on Windows, false otherwise.
5454
/// </summary>
5555
public static bool IsWindows { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
5656

5757
/// <summary>
58-
/// True if we are running in on macOS, false otherwise.
58+
/// True if we are running on macOS, false otherwise.
5959
/// </summary>
6060
public static bool IsMacOS { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
6161

6262
/// <summary>
63-
/// True if we are running in on Linux, false otherwise.
63+
/// True if we are running on Linux, false otherwise.
6464
/// </summary>
6565
public static bool IsLinux { get; } = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
6666
}

test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;
2727
using Microsoft.PowerShell.EditorServices.Logging;
2828
using Microsoft.PowerShell.EditorServices.Services.Configuration;
29+
using Microsoft.PowerShell.EditorServices.Utility;
2930

3031
namespace PowerShellEditorServices.Test.E2E
3132
{
@@ -924,9 +925,10 @@ await PsesLanguageClient
924925
}
925926

926927
[Trait("Category", "LSP")]
927-
[Fact]
928+
[SkippableFact]
928929
public async Task CanSendCompletionAndCompletionResolveRequestAsync()
929930
{
931+
Skip.If(VersionUtils.IsLinux, "This depends on the help system, which is flaky on Linux.");
930932
string filePath = NewTestFile("Write-H");
931933

932934
CompletionList completionItems = await PsesLanguageClient.TextDocument.RequestCompletion(
@@ -950,9 +952,10 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
950952
}
951953

952954
[Trait("Category", "LSP")]
953-
[Fact]
955+
[SkippableFact]
954956
public async Task CanSendCompletionResolveWithModulePrefixRequestAsync()
955957
{
958+
Skip.If(VersionUtils.IsLinux, "This depends on the help system, which is flaky on Linux.");
956959
await PsesLanguageClient
957960
.SendRequest<EvaluateRequestArguments>(
958961
"evaluate",
@@ -985,9 +988,10 @@ await PsesLanguageClient
985988
}
986989

987990
[Trait("Category", "LSP")]
988-
[Fact]
991+
[SkippableFact]
989992
public async Task CanSendHoverRequestAsync()
990993
{
994+
Skip.If(VersionUtils.IsLinux, "This depends on the help system, which is flaky on Linux.");
991995
string filePath = NewTestFile("Write-Host");
992996

993997
Hover hover = await PsesLanguageClient.TextDocument.RequestHover(

0 commit comments

Comments
 (0)