mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-18 09:35:38 -05:00
Use MemoryStream instead of stdout for outgoing messages during integration tests (#1696)
* filter * test * run all * Redirect to memorystream * revert temp changes
This commit is contained in:
@@ -40,6 +40,7 @@ using Microsoft.SqlTools.ServiceLayer.ModelManagement;
|
||||
using Microsoft.SqlTools.ServiceLayer.TableDesigner;
|
||||
using Microsoft.SqlTools.ServiceLayer.AzureBlob;
|
||||
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer
|
||||
{
|
||||
@@ -52,7 +53,7 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
private static object lockObject = new object();
|
||||
private static bool isLoaded;
|
||||
|
||||
internal static ServiceHost CreateAndStartServiceHost(SqlToolsContext sqlToolsContext)
|
||||
internal static ServiceHost CreateAndStartServiceHost(SqlToolsContext sqlToolsContext, Stream? inputStream = null, Stream? outputStream = null)
|
||||
{
|
||||
ServiceHost serviceHost = ServiceHost.Instance;
|
||||
lock (lockObject)
|
||||
@@ -60,7 +61,7 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
if (!isLoaded)
|
||||
{
|
||||
// Grab the instance of the service host
|
||||
serviceHost.Initialize();
|
||||
serviceHost.Initialize(inputStream, outputStream);
|
||||
|
||||
InitializeRequestHandlersAndServices(serviceHost, sqlToolsContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user