You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Target net8.0 in MedallionShell.Tests.csproj and in SampleCommand.csproj
Run TestWriteAfterExit targeting net8.0
Full error output
TestWriteAfterExit
No source available
Duration: 158 ms
Message:
should run on current platform
Expected: No Exception to be thrown
But was: <System.IO.IOException: The pipe is being closed.
at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset)
at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer)
at System.IO.Strategies.OSFileStreamStrategy.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk)
at Medallion.Shell.Streams.ProcessStreamWrapper.<>c.b__22_0(Stream s, Boolean ) in //MedallionShell/Streams/ProcessStreamWrapper.cs:line 49
at Medallion.Shell.Streams.ProcessStreamWrapper.DoWriteOperation[TArg](TArg arg, Action`2 action) in //MedallionShell/Streams/ProcessStreamWrapper.cs:line 155
at Medallion.Shell.Streams.ProcessStreamWrapper.Flush() in //MedallionShell/Streams/ProcessStreamWrapper.cs:line 49
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer)
at Medallion.Shell.Streams.ProcessStreamWriter.WriteLine() in /_/MedallionShell/Streams/ProcessStreamWriter.cs:line 294
at SampleCommand.PlatformCompatibilityTests.TestWriteAfterExit() in C:\Users\bartl\Documents\GitHub\MedallionShell\SampleCommand\PlatformCompatibilityTests.cs:line 58
at Medallion.Shell.Tests.PlatformCompatibilityTest.<>c__DisplayClass10_0.b__0() in C:\Users\bartl\Documents\GitHub\MedallionShell\MedallionShell.Tests\PlatformCompatibilityTest.cs:line 51
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
--- End of stack trace from previous location ---
at NUnit.Framework.Internal.ExceptionHelper.Rethrow(Exception exception)
at NUnit.Framework.Internal.Reflect.DynamicInvokeWithTransparentExceptions(Delegate delegate)
at NUnit.Framework.Internal.ExceptionHelper.RecordException(Delegate parameterlessDelegate, String parameterName)>
Stack Trace:
PlatformCompatibilityTest.RunTestAsync(Expression`1 testMethod) line 51
GenericAdapter`1.GetResult()
AsyncToSyncAdapter.Await(Func`1 invoke)
TestMethodCommand.RunTestMethod(TestExecutionContext context)
TestMethodCommand.Execute(TestExecutionContext context)
<>c__DisplayClass4_0.b__0()
<>c__DisplayClass1_0`1.b__0(Object _)
1) at Medallion.Shell.Tests.PlatformCompatibilityTest.RunTestAsync(Expression`1 testMethod) in C:\Users\bartl\Documents\GitHub\MedallionShell\MedallionShell.Tests\PlatformCompatibilityTest.cs:line 51
AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
PlatformCompatibilityTest.RunTestAsync(Expression`1 testMethod)
PlatformCompatibilityTest.TestWriteAfterExit() line 22
The text was updated successfully, but these errors were encountered:
Explanation of the Bug
The test
TestWriteAfterExit
is affected by a breaking change in .NET 8: FileStream writes when pipe is closed.Reproduction steps
net8.0
inMedallionShell.Tests.csproj
and inSampleCommand.csproj
TestWriteAfterExit
targetingnet8.0
Full error output
The text was updated successfully, but these errors were encountered: