99using System . IO ;
1010using System . Linq ;
1111using System . Reflection ;
12+ using System . Runtime . InteropServices ;
1213using System . Text ;
1314using System . Threading ;
1415using System . Threading . Tasks ;
@@ -31,6 +32,9 @@ namespace PowerShellEditorServices.Test.E2E
3132{
3233 public class LanguageServerProtocolMessageTests : IClassFixture < LSPTestsFixture > , IDisposable
3334 {
35+ // Borrowed from `VersionUtils` which can't be used here due to an initialization problem.
36+ private static bool IsLinux { get ; } = RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) ;
37+
3438 private readonly static string s_binDir =
3539 Path . GetDirectoryName ( Assembly . GetExecutingAssembly ( ) . Location ) ;
3640
@@ -924,9 +928,10 @@ await PsesLanguageClient
924928 }
925929
926930 [ Trait ( "Category" , "LSP" ) ]
927- [ Fact ]
931+ [ SkippableFact ]
928932 public async Task CanSendCompletionAndCompletionResolveRequestAsync ( )
929933 {
934+ Skip . If ( IsLinux , "This depends on the help system, which is flaky on Linux." ) ;
930935 string filePath = NewTestFile ( "Write-H" ) ;
931936
932937 CompletionList completionItems = await PsesLanguageClient . TextDocument . RequestCompletion (
@@ -950,9 +955,10 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
950955 }
951956
952957 [ Trait ( "Category" , "LSP" ) ]
953- [ Fact ]
958+ [ SkippableFact ]
954959 public async Task CanSendCompletionResolveWithModulePrefixRequestAsync ( )
955960 {
961+ Skip . If ( IsLinux , "This depends on the help system, which is flaky on Linux." ) ;
956962 await PsesLanguageClient
957963 . SendRequest < EvaluateRequestArguments > (
958964 "evaluate" ,
@@ -985,9 +991,10 @@ await PsesLanguageClient
985991 }
986992
987993 [ Trait ( "Category" , "LSP" ) ]
988- [ Fact ]
994+ [ SkippableFact ]
989995 public async Task CanSendHoverRequestAsync ( )
990996 {
997+ Skip . If ( IsLinux , "This depends on the help system, which is flaky on Linux." ) ;
991998 string filePath = NewTestFile ( "Write-Host" ) ;
992999
9931000 Hover hover = await PsesLanguageClient . TextDocument . RequestHover (
0 commit comments