Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip test that's too slow in ADO #2220

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1057,44 +1057,6 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
Assert.Contains("Writes customized output to a host", updatedCompletionItem.Documentation.String);
}

// Regression test for https://github.com/PowerShell/PowerShellEditorServices/issues/1926
[SkippableFact]
public async Task CanRequestCompletionsAndHandleExceptions()
{
PowerShellVersion details
= await PsesLanguageClient
.SendRequest("powerShell/getVersion", new GetVersionParams())
.Returning<PowerShellVersion>(CancellationToken.None);

Skip.IfNot(details.Version.StartsWith("7.2") || details.Version.StartsWith("7.3"),
"This is a bug in PowerShell 7.2 and 7.3, fixed in 7.4");

string filePath = NewTestFile(@"
@() | ForEach-Object {
if ($false) {
return
}

@{key=$}
}");

Messages.Clear(); // On some systems there's a warning message about configuration items too.
CompletionList completionItems = await PsesLanguageClient.TextDocument.RequestCompletion(
new CompletionParams
{
TextDocument = new TextDocumentIdentifier
{
Uri = DocumentUri.FromFileSystemPath(filePath)
},
Position = new Position(line: 6, character: 11)
});

Assert.Empty(completionItems);
Assert.Collection(Messages,
(message) => Assert.Contains("Error Occurred in TabExpansion2", message.Message),
(message) => Assert.Contains("Exception occurred while running handling completion request", message.Message));
}

[SkippableFact(Skip = "Completion for Expand-SlowArchive is flaky.")]
public async Task CanSendCompletionResolveWithModulePrefixRequestAsync()
{
Expand Down Expand Up @@ -1269,9 +1231,12 @@ await PsesLanguageClient
Assert.Equal(0, evaluateResponseBody.VariablesReference);
}

[Fact]
[SkippableFact]
public async Task CanSendGetCommandRequestAsync()
{
Skip.If(Environment.GetEnvironmentVariable("TF_BUILD") is not null,
"This test is too slow in CI.");

List<object> pSCommandMessages =
await PsesLanguageClient
.SendRequest("powerShell/getCommand", new GetCommandParams())
Expand Down
Loading