Skip to content

Commit

Permalink
Log messages from RequestSender (#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd authored Sep 17, 2021
1 parent e50e862 commit 2ed4229
Showing 1 changed file with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ public void CheckVersionWithTestHost()
// Send the protocol negotiation request. Note that we always serialize this data
// without any versioning in the message itself.
var data = this.dataSerializer.SerializePayload(MessageType.VersionCheck, this.highestSupportedVersion);

if (EqtTrace.IsVerboseEnabled)
{
EqtTrace.Verbose("TestRequestSender.CheckVersionWithTestHost: Sending check version message: {0}", data);
}

this.channel.Send(data);

// Wait for negotiation response
Expand All @@ -250,6 +256,12 @@ public void InitializeDiscovery(IEnumerable<string> pathToAdditionalExtensions)
MessageType.DiscoveryInitialize,
pathToAdditionalExtensions,
this.protocolVersion);

if (EqtTrace.IsVerboseEnabled)
{
EqtTrace.Verbose("TestRequestSender.InitializeDiscovery: Sending initialize discovery with message: {0}", message);
}

this.channel.Send(message);
}

Expand All @@ -268,6 +280,12 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve
MessageType.StartDiscovery,
discoveryCriteria,
this.protocolVersion);

if (EqtTrace.IsVerboseEnabled)
{
EqtTrace.Verbose("TestRequestSender.DiscoverTests: Sending discover tests with message: {0}", message);
}

this.channel.Send(message);
}
#endregion
Expand All @@ -283,7 +301,7 @@ public void InitializeExecution(IEnumerable<string> pathToAdditionalExtensions)
this.protocolVersion);
if (EqtTrace.IsVerboseEnabled)
{
EqtTrace.Verbose("TestRequestSender.InitializeExecution: Sending initializing execution with message: {0}", message);
EqtTrace.Verbose("TestRequestSender.InitializeExecution: Sending initialize execution with message: {0}", message);
}

this.channel.Send(message);
Expand Down Expand Up @@ -534,6 +552,11 @@ private void OnExecutionMessageReceived(object sender, MessageReceivedEventArgs
result,
this.protocolVersion);

if (EqtTrace.IsVerboseEnabled)
{
EqtTrace.Verbose("TestRequestSender.OnExecutionMessageReceived: Sending AttachDebugger with message: {0}", message);
}

this.channel.Send(resultMessage);

break;
Expand Down

0 comments on commit 2ed4229

Please sign in to comment.