mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -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:
@@ -5,6 +5,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
@@ -188,8 +189,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Common
|
||||
var hostDetails = new HostDetails(hostName, hostProfileId, hostVersion);
|
||||
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails);
|
||||
|
||||
// Grab the instance of the service host
|
||||
ServiceHost serviceHost = HostLoader.CreateAndStartServiceHost(sqlToolsContext);
|
||||
// Initialize the ServiceHost, using a MemoryStream for the output stream so that we don't fill up the logs
|
||||
// with a bunch of outgoing messages (which aren't used for anything during tests)
|
||||
ServiceHost serviceHost = HostLoader.CreateAndStartServiceHost(sqlToolsContext, null, new MemoryStream());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user