Skip to content

Commit

Permalink
Use native methods for flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote committed Dec 6, 2024
1 parent c9b2288 commit c2a10d3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,9 @@ public async Task CanSendCompletionAndCompletionResolveRequestAsync()
Assert.Contains("Writes customized output to a host", updatedCompletionItem.Documentation.String);
}

[SkippableFact(Skip = "Completion for Expand-SlowArchive is flaky.")]

// [SkippableFact(Skip = "Completion for Expand-SlowArchive is flaky.")]
[Fact]
public async Task CanSendCompletionResolveWithModulePrefixRequestAsync()
{
await PsesLanguageClient
Expand All @@ -1084,9 +1086,7 @@ await PsesLanguageClient
CompletionItem completionItem = Assert.Single(completionItems,
completionItem1 => completionItem1.Label == "Expand-SlowArchive");

CompletionItem updatedCompletionItem = await PsesLanguageClient
.SendRequest("completionItem/resolve", completionItem)
.Returning<CompletionItem>(CancellationToken.None);
CompletionItem updatedCompletionItem = await PsesLanguageClient.ResolveCompletion(completionItem);

Assert.Contains("Extracts files from a specified archive", updatedCompletionItem.Documentation.String);
}
Expand Down Expand Up @@ -1123,22 +1123,21 @@ public async Task CanSendSignatureHelpRequestAsync()
{
string filePath = NewTestFile("Get-Date -");

SignatureHelp signatureHelp = await PsesLanguageClient
.SendRequest(
"textDocument/signatureHelp",
new SignatureHelpParams
SignatureHelp signatureHelp = await PsesLanguageClient.RequestSignatureHelp
(
new SignatureHelpParams
{
TextDocument = new TextDocumentIdentifier
{
TextDocument = new TextDocumentIdentifier
{
Uri = new Uri(filePath)
},
Position = new Position
{
Line = 0,
Character = 10
}
})
.Returning<SignatureHelp>(CancellationToken.None);
Uri = new Uri(filePath)
},
Position = new Position
{
Line = 0,
Character = 10
}
}
);

Assert.Contains("Get-Date", signatureHelp.Signatures.First().Label);
}
Expand Down
5 changes: 3 additions & 2 deletions test/PowerShellEditorServices.Test.E2E/xunit.runner.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
"appDomain": "denied",
"parallelizeTestCollections": true,
"parallelAlgorithm": "aggressive",
"parallelAlgorithm": "conservative",
"methodDisplay": "method",
"diagnosticMessages": true,
"longRunningTestSeconds": 60
"longRunningTestSeconds": 10,
"showLiveOutput": true
}

0 comments on commit c2a10d3

Please sign in to comment.