mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Remove testing cancel from VerifySchemaCompareServiceCalls (#1731)
This commit is contained in:
@@ -1216,25 +1216,6 @@ WITH VALUES
|
||||
DeploymentOptions = new DeploymentOptions()
|
||||
};
|
||||
|
||||
await SchemaCompareService.Instance.HandleSchemaCompareRequest(schemaCompareParams, schemaCompareRequestContext.Object);
|
||||
|
||||
// Schema compare Cancel call
|
||||
var schemaCompareCancelRequestContext = new Mock<RequestContext<ResultStatus>>();
|
||||
schemaCompareCancelRequestContext.Setup((RequestContext<ResultStatus> x) => x.SendResult(It.Is<ResultStatus>((result) =>
|
||||
result.Success == true))).Returns(Task.FromResult(new object()));
|
||||
|
||||
var schemaCompareCancelParams = new SchemaCompareCancelParams
|
||||
{
|
||||
OperationId = operationId
|
||||
};
|
||||
|
||||
cancelled = true;
|
||||
await SchemaCompareService.Instance.HandleSchemaCompareCancelRequest(schemaCompareCancelParams, schemaCompareCancelRequestContext.Object);
|
||||
await SchemaCompareService.Instance.CurrentSchemaCompareTask;
|
||||
|
||||
|
||||
// complete schema compare call for further testing
|
||||
cancelled = false;
|
||||
await SchemaCompareService.Instance.HandleSchemaCompareRequest(schemaCompareParams, schemaCompareRequestContext.Object);
|
||||
await SchemaCompareService.Instance.CurrentSchemaCompareTask;
|
||||
|
||||
@@ -1933,14 +1914,6 @@ WITH VALUES
|
||||
|
||||
private bool ValidateScResult(SchemaCompareResult diffResult, out DiffEntry diffEntry, string operationId, ref bool cancelled)
|
||||
{
|
||||
if (cancelled)
|
||||
{
|
||||
Assert.True(diffResult.Differences == null, "Differences should be null after cancel");
|
||||
Assert.True(diffResult.Success == false, "Result success for schema compare should be false after cancel");
|
||||
diffEntry = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
diffEntry = diffResult.Differences.ElementAt(0);
|
||||
Assert.True(diffResult.Success == true, "Result success is false for schema compare");
|
||||
Assert.True(diffResult.Differences != null, "Schema compare Differences should not be null");
|
||||
|
||||
Reference in New Issue
Block a user