mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Fix Ops Studio issue 97 where query connection is dropped (#549)
- Fixes https://github.com/Microsoft/sqlopsstudio/issues/97. - This should fix the bulk of the issues reported by users since it's the 1st use of this connection in the query code path. - Implemented the fix in the connection service. This will always open a connection when calling `GetOrOpenConnection`. I cannot see a reason why the connection returned from this should ever be closed. - resolve issues in both this code path and the edit data code path since both use this method.
This commit is contained in:
@@ -233,7 +233,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
|
||||
|
||||
var result = Task.Run(() => testService.Script(requestParams));
|
||||
ScriptingProgressNotificationParams progressParams = await testService.Driver.WaitForEvent(ScriptingProgressNotificationEvent.Type, TimeSpan.FromSeconds(10));
|
||||
Task.Run(() => testService.CancelScript(progressParams.OperationId));
|
||||
Task.Run(() => testService.CancelScript(progressParams.OperationId).Wait());
|
||||
ScriptingCompleteParams cancelEvent = await testService.Driver.WaitForEvent(ScriptingCompleteEvent.Type, TimeSpan.FromSeconds(10));
|
||||
Assert.True(cancelEvent.Canceled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user