mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-03 01:25:44 -05:00
fixed the tests for task service (#384)
* fixed the tests for task service
This commit is contained in:
@@ -71,12 +71,12 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices
|
||||
/// <summary>
|
||||
/// Starts the task and monitor the task progress
|
||||
/// </summary>
|
||||
public async Task Run()
|
||||
public async Task RunAsync()
|
||||
{
|
||||
TaskStatus = SqlTaskStatus.InProgress;
|
||||
await TaskToRun(this).ContinueWith(task =>
|
||||
{
|
||||
if (task.IsCompleted)
|
||||
if (task.IsCompleted && !task.IsCanceled && !task.IsFaulted)
|
||||
{
|
||||
TaskResult taskResult = task.Result;
|
||||
TaskStatus = taskResult.TaskStatus;
|
||||
@@ -96,6 +96,14 @@ namespace Microsoft.SqlTools.ServiceLayer.TaskServices
|
||||
});
|
||||
}
|
||||
|
||||
//Run Task synchronously
|
||||
public void Run()
|
||||
{
|
||||
RunAsync().ContinueWith(task =>
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if task has any messages
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user