Skip to content

Commit

Permalink
Increase default LSP notification test timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Sep 18, 2023
1 parent 0b1b92e commit a21622f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions YarnSpinner.LanguageServer.Tests/LanguageServerTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected async Task<T> GetTaskResultOrTimeoutAsync<T>(TaskCompletionSource<T> t
CancellationToken
)
);
task.Task.Should().BeSameAs(winner, "because the result should arrive within {0} seconds", timeout);
winner.Should().BeSameAs(task.Task, "because the result should arrive within {0} seconds", timeout);

return await task.Task;
}
Expand All @@ -172,7 +172,7 @@ protected async Task<T> GetTaskResultOrTimeoutAsync<T>(TaskCompletionSource<T> t
/// <param name="timeout">The amount of time to wait for
/// diagnostics.</param>
/// <returns>A collection of <see cref="Diagnostic"/> objects.</returns>
protected async Task<PublishDiagnosticsParams> GetDiagnosticsAsync(Func<PublishDiagnosticsParams, bool>? test = null, double timeout = 2f)
protected async Task<PublishDiagnosticsParams> GetDiagnosticsAsync(Func<PublishDiagnosticsParams, bool>? test = null, double timeout = 5f)
{
return await GetTaskResultOrTimeoutAsync(
ReceivedDiagnosticsNotifications.AddListener(test) ,
Expand All @@ -181,7 +181,7 @@ protected async Task<PublishDiagnosticsParams> GetDiagnosticsAsync(Func<PublishD
);
}

protected async Task<NodesChangedParams> GetNodesChangedNotificationAsync(Func<NodesChangedParams, bool>? test = null, double timeout = 2f) {
protected async Task<NodesChangedParams> GetNodesChangedNotificationAsync(Func<NodesChangedParams, bool>? test = null, double timeout = 5f) {
return await GetTaskResultOrTimeoutAsync(
NodesChangedNotification.AddListener(test),
null,
Expand Down

0 comments on commit a21622f

Please sign in to comment.