runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Unix: System.IO.Pipes; NamePipeServerStream not throwing exception when adding additional servers with inconsistent pipedirections

Open bpschoch opened this issue 11 years ago • 1 comments

  [Fact]
        public static void ServerVerifyMultipleServerInconsistantType()
        {
            const string uniqueServerName = "UniqueName11111";
            using (NamedPipeServerStream server = new NamedPipeServerStream(uniqueServerName, PipeDirection.In, 2, PipeTransmissionMode.Byte, PipeOptions.Asynchronous))
            {
                //Assert.Throws<IOException>(() => new NamedPipeServerStream(uniqueServerName, PipeDirection.In, 2, PipeTransmissionMode.Byte, PipeOptions.Asynchronous));
                Assert.Throws<UnauthorizedAccessException>(() => new NamedPipeServerStream(uniqueServerName, PipeDirection.Out));
                //Assert.Throws<UnauthorizedAccessException>(() => new NamedPipeServerStream(uniqueServerName, PipeDirection.In, 4, PipeTransmissionMode.Message));
            }
        }

13:30:03 �[31m System.IO.Pipes.Tests.NamedPipesThrowsTests.ServerVerifyMultipleServerInconsistantType [FAIL] 13:30:03 �[37m Assert.Throws() Failure 13:30:03 Expected: typeof(System.UnauthorizedAccessException) 13:30:03 Actual: (No exception was thrown) 13:30:03 �[30m Stack Trace: 13:30:03 �[37m at System.IO.Pipes.Tests.NamedPipesThrowsTests.ServerVerifyMultipleServerInconsistantType()

bpschoch avatar May 15 '15 19:05 bpschoch

Fixed by dotnet/corefx#1884

stephentoub avatar Jun 03 '15 03:06 stephentoub