mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Update broken BindingQueue test from previous commit (#725)
This commit is contained in:
@@ -213,10 +213,11 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.LanguageServer
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queue an task with a long operation causing a timeout and make sure subsequent tasks still execute
|
||||
/// Queue a task with a long operation causing a timeout
|
||||
/// and make sure subsequent tasks don't execute while task is completing
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void QueueWithTimeoutRunsNextTask()
|
||||
public void QueueWithTimeoutDoesNotRunNextTask()
|
||||
{
|
||||
string operationKey = "testkey";
|
||||
ManualResetEvent firstEventExecuted = new ManualResetEvent(false);
|
||||
@@ -256,13 +257,13 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.LanguageServer
|
||||
);
|
||||
|
||||
var result = firstEventExecuted.WaitOne(totalTimeout);
|
||||
Assert.True(result);
|
||||
Assert.False(result);
|
||||
|
||||
this.bindingQueue.StopQueueProcessor(15000);
|
||||
|
||||
Assert.Equal(1, this.timeoutCallCount);
|
||||
Assert.True(firstOperationCanceled);
|
||||
Assert.True(secondOperationExecuted);
|
||||
Assert.False(firstOperationCanceled);
|
||||
Assert.False(secondOperationExecuted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user