Skip to content

Commit a98bbd7

Browse files
EvangelinkCopilot
andauthored
Revert WebSocket transport for browser-wasm dotnettestcli (#10149)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent bea96ce commit a98bbd7

48 files changed

Lines changed: 72 additions & 4070 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/mstest-runner-protocol/004-protocol-dotnet-test-pipe.md‎

Lines changed: 10 additions & 184 deletions
Large diffs are not rendered by default.

‎src/Platform/Microsoft.Testing.Extensions.HangDump/InternalAPI/InternalAPI.Unshipped.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteExecutionS
1616
static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteListPayload<T>(System.IO.Stream! stream, ushort fieldId, T[]? list, System.Action<System.IO.Stream!, T>! writeItem) -> void
1717
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Expected = 10 -> ushort
1818
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Actual = 11 -> ushort
19-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Stream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
20-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Stream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
21-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Pipes.PipeStream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
22-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Pipes.PipeStream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!

‎src/Platform/Microsoft.Testing.Extensions.MSBuild/InternalAPI.Unshipped.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteExecutionS
1515
static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteListPayload<T>(System.IO.Stream! stream, ushort fieldId, T[]? list, System.Action<System.IO.Stream!, T>! writeItem) -> void
1616
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Expected = 10 -> ushort
1717
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Actual = 11 -> ushort
18-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Stream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
19-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Stream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
20-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Pipes.PipeStream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
21-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Pipes.PipeStream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!

‎src/Platform/Microsoft.Testing.Extensions.Retry/InternalAPI/InternalAPI.Unshipped.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteExecutionS
1919
static Microsoft.Testing.Platform.IPC.Serializers.BaseSerializer.WriteListPayload<T>(System.IO.Stream! stream, ushort fieldId, T[]? list, System.Action<System.IO.Stream!, T>! writeItem) -> void
2020
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Expected = 10 -> ushort
2121
const Microsoft.Testing.Platform.IPC.FailedTestResultMessageFieldsId.Actual = 11 -> ushort
22-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Stream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
23-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Stream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
24-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Pipes.PipeStream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
25-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Pipes.PipeStream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!

‎src/Platform/Microsoft.Testing.Extensions.TrxReport/InternalAPI/InternalAPI.Unshipped.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,3 @@ Microsoft.Testing.Extensions.MergeOutputFileHelper
6969
static Microsoft.Testing.Extensions.MergeOutputFileHelper.BuildCaseFoldedProbePath(string! directory, string! probeFileName) -> string!
7070
static Microsoft.Testing.Extensions.MergeOutputFileHelper.EnsureOutputDoesNotAliasInput(System.Collections.Generic.IReadOnlyList<string!>! inputPaths, string! outputPath) -> void
7171
static Microsoft.Testing.Extensions.MergeOutputFileHelper.WriteViaTemporarySiblingAsync(string! outputPath, System.Func<string!, System.Threading.Tasks.Task!>! writeToTempAsync) -> System.Threading.Tasks.Task!
72-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Stream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
73-
Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Stream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
74-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.ReadNextMessageAsync(System.IO.Pipes.PipeStream! stream, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task<object?>!
75-
*REMOVED*Microsoft.Testing.Platform.IPC.NamedPipeConnectionBase.WriteMessageAsync(System.IO.Pipes.PipeStream! stream, Microsoft.Testing.Platform.IPC.INamedPipeSerializer! serializer, object! message, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!

‎src/Platform/Microsoft.Testing.Platform/Builder/TestApplication.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private static async Task LogInformationAsync(
186186

187187
string moduleName = testApplicationModuleInfo.GetDisplayName();
188188
await logger.LogInformationAsync($"Test module: {moduleName}").ConfigureAwait(false);
189-
await logger.LogInformationAsync($"Command line arguments: '{CommandLineArgumentsRedactor.Redact(args)}'").ConfigureAwait(false);
189+
await logger.LogInformationAsync($"Command line arguments: '{(args.Length == 0 ? string.Empty : args.Aggregate((a, b) => $"{a} {b}"))}'").ConfigureAwait(false);
190190

191191
StringBuilder machineInfo = new();
192192
#pragma warning disable RS0030 // Do not use banned APIs

‎src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineArgumentsRedactor.cs‎

Lines changed: 0 additions & 228 deletions
This file was deleted.

‎src/Platform/Microsoft.Testing.Platform/CommandLine/CommandLineOptionsValidator.Helpers.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ private static ValidationResult AddCommandLine(CommandLineParseResult parseResul
2424

2525
private static ValidationResult InvalidWithCommandLine(CommandLineParseResult parseResult, string errorMessage)
2626
{
27-
errorMessage = parseResult.RedactError(errorMessage);
2827
if (parseResult.CommandLine.Length == 0)
2928
{
3029
return ValidationResult.Invalid(errorMessage);

‎src/Platform/Microsoft.Testing.Platform/CommandLine/ParseResult.cs‎

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ namespace Microsoft.Testing.Platform.CommandLine;
99
[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
1010
public sealed class CommandLineParseResult : IEquatable<CommandLineParseResult>
1111
{
12-
private readonly IReadOnlyList<string> _arguments;
13-
1412
/// <summary>
1513
/// The prefix for options.
1614
/// </summary>
@@ -33,22 +31,11 @@ public CommandLineParseResult(string? toolName, IReadOnlyList<CommandLineParseOp
3331
}
3432

3533
internal CommandLineParseResult(string? toolName, IReadOnlyList<CommandLineParseOption> options, IReadOnlyList<string> errors, IReadOnlyList<string> arguments)
36-
: this(toolName, options, errors, arguments, arguments)
37-
{
38-
}
39-
40-
internal CommandLineParseResult(
41-
string? toolName,
42-
IReadOnlyList<CommandLineParseOption> options,
43-
IReadOnlyList<string> errors,
44-
IReadOnlyList<string> arguments,
45-
IReadOnlyList<string> expandedArguments)
4634
{
4735
ToolName = toolName;
4836
Options = options;
49-
_arguments = expandedArguments;
50-
Errors = errors.Select(RedactError).ToArray();
51-
CommandLine = CommandLineArgumentsRedactor.Redact([.. arguments]);
37+
Errors = errors;
38+
CommandLine = string.Join(" ", arguments);
5239
}
5340

5441
/// <summary>
@@ -68,8 +55,6 @@ internal CommandLineParseResult(
6855

6956
internal string CommandLine { get; }
7057

71-
internal string RedactError(string error) => CommandLineArgumentsRedactor.RedactError(error, _arguments);
72-
7358
/// <summary>
7459
/// Gets a value indicating whether the parsing has errors.
7560
/// </summary>

‎src/Platform/Microsoft.Testing.Platform/CommandLine/Parser.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static CommandLineParseResult Parse(List<string> args, IEnvironment envi
101101
options.Add(new(currentOption, [.. currentOptionArguments]));
102102
}
103103

104-
return new CommandLineParseResult(toolName, options, errors, originalArgs, args);
104+
return new CommandLineParseResult(toolName, options, errors, originalArgs);
105105

106106
static void ParseOptionAndSeparators(string arg, out string? currentOption, out string? currentArg)
107107
{

0 commit comments

Comments
 (0)