bpschoch
bpschoch
I'm extending the unit test for System.IO.Pipes, and have discovered a potential hole in the documentation regarding async operations on named pipes. If I create a NamedPipeServerStream with PipeOptions.Asynchronous optiion...
Someone posted on CoreClr: https://github.com/dotnet/coreclr/issues/933 a requirement to have StreamWriter to optionally not emit BOM to the stream. A possible solution is to either add a defaulted bool parameter to...
I get very occasional errors in my unit tests for pipes that I'm developing, but they occur after the unit tests are successful: xUnit.net console test runner (32-bit .NET Core)...
I had previously installed the older versions a while back and I'm sure that is the cause of the problem. I want to document this as I presume others may...
``` C# [Fact] public static void ServerAfterDisconnectThrows() { using (NamedPipeServerStream server = new NamedPipeServerStream("unique3", PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous)) { using (NamedPipeClientStream client = new NamedPipeClientStream("unique3")) { Task clientConnect = client.ConnectAsync();...
``` C# [Fact] public static void ServerVerifyMultipleServerInconsistantType() { const string uniqueServerName = "UniqueName11111"; using (NamedPipeServerStream server = new NamedPipeServerStream(uniqueServerName, PipeDirection.In, 2, PipeTransmissionMode.Byte, PipeOptions.Asynchronous)) { //Assert.Throws(() => new NamedPipeServerStream(uniqueServerName, PipeDirection.In, 2,...
``` C# [Fact] public static void ServerNotConnectedThrows() { using (NamedPipeServerStream server = new NamedPipeServerStream("tempnotconnected", PipeDirection.InOut, 1)) { // doesn't throw execeptions PipeTransmissionMode transmitMode = server.TransmissionMode; Assert.Throws(() => server.ReadMode = (PipeTransmissionMode)999);...
``` C# [Fact] public static void ClientDisconnectedPipeThrows() { using (NamedPipeServerStream server = new NamedPipeServerStream("testServer2", PipeDirection.InOut)) { using (NamedPipeClientStream client = new NamedPipeClientStream("testServer2")) { byte[] buffer = new byte[] { 0,...
``` C# [Fact] public static void ServerCloneTests() { const string pipeName = "fooclone"; byte[] msg1 = new byte[] { 5, 7, 9, 10 }; byte[] received1 = new byte[] {...
``` C# [Fact] public static void ServerWhenDisplosedThrows() { using (NamedPipeServerStream server = new NamedPipeServerStream("unique2", PipeDirection.InOut)) { server.Dispose(); Assert.Throws(() => server.Disconnect()); // disconnect when disposed Assert.Throws(() => server.WaitForConnection()); // disconnect when...