mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Adding pausing functionality for the profiler (#634)
* Dropping profiler session on stop request * Changes to IXEventSession to simplify dropping sessions * Stop sessions instead of dropping, disable flaky tests * Initial framework for profiler pause requests * Restructuring profiler session monitoring * Fixes to session monitor * Testing for pause functionality * Fixing comments from PR * Changes to testing * Commenting out flaky test * Deleting leftover testing code
This commit is contained in:
committed by
GitHub
parent
aff0f1afae
commit
f53e532225
@@ -44,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Profiler
|
||||
string sessionId = null;
|
||||
var startContext = new Mock<RequestContext<StartProfilingResult>>();
|
||||
startContext.Setup(rc => rc.SendResult(It.IsAny<StartProfilingResult>()))
|
||||
.Returns<StartProfilingResult>((result) =>
|
||||
.Returns<StartProfilingResult>((result) =>
|
||||
{
|
||||
// capture the session id for sending the stop message
|
||||
sessionId = result.SessionId;
|
||||
@@ -71,7 +71,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Profiler
|
||||
await profilerService.HandleStopProfilingRequest(stopParams, stopContext.Object);
|
||||
|
||||
stopContext.VerifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -82,7 +82,7 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Profiler
|
||||
{
|
||||
var liveConnection = LiveConnectionHelper.InitLiveConnectionInfo("master");
|
||||
ProfilerService profilerService = new ProfilerService();
|
||||
IXEventSession xeSession = profilerService.CreateXEventSession(liveConnection.ConnectionInfo);
|
||||
IXEventSession xeSession = profilerService.GetOrCreateXEventSession("Profiler", liveConnection.ConnectionInfo);
|
||||
Assert.NotNull(xeSession);
|
||||
Assert.NotNull(xeSession.GetTargetXml());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user