`SocketException` ("can't assign requested address") when starting child process on 6.0.0
We just upgraded to 6.0.0 and immediately ran into a tricky issue. Many of our tests invoke an external executable (either as part of setup, or as part of the test itself) and read its stdout output back into the test. Whenever we do this running in the new adapter, we get this exception while reading from the stdout stream:
System.IO.IOException : Can't assign requested address
----> System.Net.Sockets.SocketException : Can't assign requested address
Important: The exception only happens if the invoked executable actually writes anything to stderr. Additionally, it does not matter if our test code tries to read back stderr from the process or not.
- The exception does not happen on 5.2.0 — same exact repro scenario works fine there
- The exception happens on macOS and Linux, but not on Windows
- The exception happens regardless whether we use MTP or VSTest
Here's a minimal repro project: nunit-6-repro.zip
Simply extract and do either dotnet run or dotnet test, and you'll see the issue.
Thanks! We'll need to come back to you for checking this.
Sure, happy to help in any way I can.
@DaRosenberg Can you check https://www.nuget.org/packages/NUnit3TestAdapter/6.0.1-alpha.6
v6.0.1-alpha.6 seems to fix the issue for me: https://github.com/PhilippNaused/Vilens/actions/runs/20377146042
@OsirisTerje Yep, seems to work on 6.0.1-alpha.6.