mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-22 09:35:38 -05:00
added handler for oe refresh and close session requests (#332)
* added handler for oe refresh and close session requests
This commit is contained in:
@@ -79,6 +79,15 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
/// Runs a query by calling the services directly (not using the test driver)
|
||||
/// </summary>
|
||||
public void RunQuery(TestServerType serverType, string databaseName, string queryText, bool throwOnError = false)
|
||||
{
|
||||
RunQueryAsync(serverType, databaseName, queryText, throwOnError).Wait();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Runs a query by calling the services directly (not using the test driver)
|
||||
/// </summary>
|
||||
public async Task RunQueryAsync(TestServerType serverType, string databaseName, string queryText, bool throwOnError = false)
|
||||
{
|
||||
string uri = "";
|
||||
using (SelfCleaningTempFile queryTempFile = new SelfCleaningTempFile())
|
||||
@@ -88,7 +97,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
ConnectionInfo connInfo = InitLiveConnectionInfo(serverType, databaseName, uri);
|
||||
Query query = new Query(queryText, connInfo, new QueryExecutionSettings(), MemoryFileSystem.GetFileStreamFactory());
|
||||
query.Execute();
|
||||
query.ExecutionTask.Wait();
|
||||
await query.ExecutionTask;
|
||||
|
||||
if (throwOnError)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user