-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log callbacks to delegates better #3283
Conversation
@@ -63,6 +63,13 @@ public Task Send(string data) | |||
/// <inheritdoc /> | |||
public Task NotifyDataAvailable() | |||
{ | |||
// TODO: Review the comment below, because it says something different than what is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a todo for you before the PR gets merged or a later change that needs to be done? If the 2nd, could we create a ticket and link it to the todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please do it 😏
src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CommunicationUtilities/LengthPrefixCommunicationChannel.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
I think it's a good addition thx @nohwnd, it should help a lot during the investigations. |
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CoreUtilities/Utilities/MulticastDelegateUtilities.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Amaury Levé <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments, otherwise LGTM.
test/Microsoft.TestPlatform.Client.UnitTests/Execution/TestRunRequestTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Amaury Levé <[email protected]>
Pull Request is not mergeable
Description
Log what is being called when event is invoked.
Example of the log: TpTrace Verbose: 0 : 20708, 3, 2022/01/27, 13:26:24.691, 2456941827563, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: InternalTestLoggerEvents.SendTestRunStart: Invoking callback 1/1 for Microsoft.VisualStudio.TestPlatform.CommandLine.Internal.ConsoleLogger.TestRunStartHandler, took 0 ms.
TpTrace Verbose: 0 : 84508, 7, 2022/01/27, 13:33:05.983, 2460954751207, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: TestRun.TestRunComplete: Invoking callback 2/2 for Microsoft.VisualStudio.TestPlatform.CommandLine.TestRunResultAggregator.TestRunCompletionHandler, took 0 ms.
TpTrace Verbose: 0 : 84508, 7, 2022/01/27, 13:33:05.983, 2460954753814, vstest.console.exe, MulticastDelegateUtilities.SafeInvoke: TestRun.TestRunComplete: Invoking callback 2/2 for Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentExecutor+TestRunRequestEventsRegistrar.TestRunRequest_OnRunCompletion, took 0 ms.
TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066033, vstest.console.exe, TcpClientExtensions.MessageLoopAsync: Polling on remoteEndPoint: 127.0.0.1:1055 localEndPoint: 127.0.0.1:1054
TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066212, vstest.console.exe, TcpClientExtensions.MessageLoopAsync: NotifyDataAvailable remoteEndPoint: 127.0.0.1:1055 localEndPoint: 127.0.0.1:1054
TpTrace Verbose: 0 : 62012, 5, 2022/01/27, 13:46:07.014, 2468765066380, vstest.console.exe, LengthPrefixCommunicationChannel.NotifyDataAvailable: New data are waiting to be received, but there is no subscriber to be notified. Not reading them from the stream.