Update broken BindingQueue test from previous commit (#725)

This commit is contained in:
Karl Burtram
2018-10-31 15:24:02 -07:00
committed by GitHub
parent adf10ece87
commit 6153279840

View File

@@ -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);
}
}
}