Avoid plugging in TerminalOutputDevice when running with pipe protocol#7564
Avoid plugging in TerminalOutputDevice when running with pipe protocol#7564Youssef1313 wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the dotnet-test pipe protocol integration so the platform can avoid wiring the default terminal output device, aiming to prevent MTP output from interfering with dotnet test live output.
Changes:
- Expand pipe-protocol supported versions to include
1.0.1and advertise them during handshake. - Allow
ProxyOutputDevice/PlatformOutputDeviceManagerto operate without a terminal output device when running under pipe protocol. - Adjust
TestHostBuilderprotocol detection to decide when pipe protocol is active and influence output-device construction.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Constants.cs | Replaces single protocol version with a semicolon-delimited supported-versions list and documents 1.0.1. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/DotnetTestConnection.cs | Sends supported versions during handshake using the new constants. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/ProxyOutputDevice.cs | Makes the wrapped platform output device nullable and guards calls accordingly. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs | Suppresses creation of the default terminal output device for pipe protocol (currently by returning null). |
| src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs | Detects jsonrpc vs pipe protocol and passes protocol info into output-device construction. |
You can also share your feedback on Copilot code review. Take the survey.
src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs
Outdated
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/ProxyOutputDevice.cs
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs
Show resolved
Hide resolved
src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Constants.cs
Outdated
Show resolved
Hide resolved
3e0b7be to
e1a5220
Compare
e8089ff to
52d6ce1
Compare
There was a problem hiding this comment.
Pull request overview
Updates Microsoft.Testing.Platform’s output-device wiring so that when running under the dotnet-test pipe protocol, the default TerminalOutputDevice is not installed (avoiding interference with SDK live output), while keeping the rest of the host/service construction flow intact.
Changes:
- Make the platform output device optional (nullable) and guard call sites accordingly.
- Introduce pipe-protocol detection and skip creating the default terminal output device in that mode.
- Expand dotnet-test IPC protocol constants to advertise multiple supported versions.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Platform/Microsoft.Testing.Platform/Services/ServiceProviderExtensions.cs | Makes GetPlatformOutputDevice nullable (non-required service). |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/IPC/Constants.cs | Replaces single protocol version constant with a supported-versions list and adds explanatory comments. |
| src/Platform/Microsoft.Testing.Platform/ServerMode/DotnetTest/DotnetTestConnection.cs | Sends supported protocol versions during handshake. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/ProxyOutputDevice.cs | Allows OriginalOutputDevice to be null and guards dispatch calls. |
| src/Platform/Microsoft.Testing.Platform/OutputDevice/OutputDeviceManager.cs | Skips default terminal output device creation when in pipe protocol. |
| src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs | Detects pipe protocol; avoids registering/initializing a terminal output device in that scenario. |
| src/Platform/Microsoft.Testing.Platform/Hosts/TestFrameworkBuilderData.cs | Allows PlatformOutputDisplayService to be null. |
You can also share your feedback on Copilot code review. Take the survey.
No description provided.