Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 26a5243

Browse files
committed
Remove Pipes test from System.Diagnostics.Process.Tests
The test exercises multiple libraries (Process, Pipes) and is focused on inter-process communication, so it'll be recreated in a new project focused on cross-process communication testing.
1 parent 50ad57b commit 26a5243

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

src/System.Diagnostics.Process/tests/System.Diagnostics.Process.TestConsoleApp/TestConsoleApp.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,6 @@ static int Main(string[] args)
5353
}
5454
// no sleep here
5555
}
56-
else if (args[0].Equals("ipc"))
57-
{
58-
using (var inbound = new AnonymousPipeClientStream(PipeDirection.In, args[1]))
59-
using (var outbound = new AnonymousPipeClientStream(PipeDirection.Out, args[2]))
60-
{
61-
// Echo 10 bytes from inbound to outbound
62-
for (int i = 0; i < 10; i++)
63-
{
64-
int b = inbound.ReadByte();
65-
outbound.WriteByte((byte)b);
66-
}
67-
}
68-
}
6956
else
7057
{
7158
Console.WriteLine(string.Join(" ", args));

src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests/ProcessTests.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Microsoft.Win32.SafeHandles;
55
using System.Collections.Generic;
66
using System.IO;
7-
using System.IO.Pipes;
87
using System.Linq;
98
using System.Runtime.InteropServices;
109
using System.Threading;
@@ -581,31 +580,6 @@ public void TestStartInfo()
581580
}
582581
}
583582

584-
[Fact]
585-
public void TestIPCProcess()
586-
{
587-
Process p = CreateProcess("ipc");
588-
589-
using (var outbound = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable))
590-
using (var inbound = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable))
591-
{
592-
p.StartInfo.Arguments += " " + outbound.GetClientHandleAsString() + " " + inbound.GetClientHandleAsString();
593-
p.Start();
594-
outbound.DisposeLocalCopyOfClientHandle();
595-
inbound.DisposeLocalCopyOfClientHandle();
596-
597-
for (byte i = 0; i < 10; i++)
598-
{
599-
outbound.WriteByte(i);
600-
int received = inbound.ReadByte();
601-
Assert.Equal(i, received);
602-
}
603-
604-
Assert.True(p.WaitForExit(WaitInMS));
605-
Assert.Equal(SuccessExitCode, p.ExitCode);
606-
}
607-
}
608-
609583
[Fact]
610584
public void TestThreadCount()
611585
{

0 commit comments

Comments
 (0)