Originally, I encountered this error when running the tests on TeamCity. However, I can reproduce it 1:1 locally as well.
We are currently upgrading NUnitConsole on our build server from version 3.17.0 to 3.20.1.
In one of our projects, we encountered the following error. I then tested with other NUnitConsole versions. It still works with 3.18.3 and 3.19.2. Only starting from 3.20.1 do I experience issues:
NUnit.Engine.NUnitEngineUnloadException : Multiple exceptions encountered. Retrieve AggregatedExceptions property for more information
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> NUnit.Engine.NUnitEngineUnloadException : Agent Process was terminated successfully after error.
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
----> System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
For each individual assembly, I also get the following message:
- Error : C:\VCS\jtl-framework-core\bin\Release\net8.0\JTL.Domain.Base.Unittests.dll
System.Net.Sockets.SocketException : Eine vorhandene Verbindung wurde vom Remotehost geschlossen
--SocketException
Eine vorhandene Verbindung wurde vom Remotehost geschlossen
bei NUnit.Engine.Communication.Transports.Tcp.SocketReader.GetNextMessage() in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine.core\Communication\Transports\Tcp\SocketReader.cs:Zeile 42.
bei NUnit.Engine.Communication.Transports.Tcp.TestAgentTcpProxy.TestRunResult(ITestEventListener listener) in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine\Communication\Transports\Tcp\TestAgentTcpProxy.cs:Zeile 116.
bei NUnit.Engine.Runners.ProcessRunner.RunTests(ITestEventListener listener, TestFilter filter) in D:\a\nunit-console\nunit-console\src\NUnitEngine\nunit.engine\Runners\ProcessRunner.cs:Zeile 138.
- The full command line being used:
C:\VCS\NUnit.Console-3.20.1\bin\net462\nunit3-console.exe --noheader --where cat!=IgnoreOnBuildserver --skipnontestassemblies --result=C:\VCS\1.xml JTL.Framework.Core.EventBus.Unittests\bin\Release\net8.0\JTL.Framework.Core.EventBus.Unittests.dll JTL.Framework.Core.EventBus.Unittests\bin\Release\net48\JTL.Framework.Core.EventBus.Unittests.dll bin\Release\net8.0\JTL.WebP.Unittests.dll bin\Release\net8.0\JTL.Shared.Unittests.dll bin\Release\net8.0\JTL.Infrastructure.Unittests.dll bin\Release\net8.0\JTL.Inbound.Mailing.Integrationstests.dll bin\Release\net8.0\JTL.Framework.Core.UnitTests.dll bin\Release\net8.0\JTL.Framework.Core.Dispatcher.Unittests.dll bin\Release\net8.0\JTL.Domain.Base.Unittests.dll bin\Release\net48\JTL.Shared.Unittests.dll bin\Release\net48\JTL.Infrastructure.Unittests.dll bin\Release\net48\JTL.Inbound.Mailing.Integrationstests.dll bin\Release\net48\JTL.Framework.Core.UnitTests.dll bin\Release\net48\JTL.Framework.Core.Dispatcher.Unittests.dll bin\Release\net48\JTL.Domain.Base.Unittests.dll
- Method of installation: zip
- Log files: log.zip
- NUnitConsole 3.20.1
- All versions of the NUnit Framework in use: NUnit (4.3.2), NUnit3TestAdapter (5.0.0)
- Whether the behaviour is any different when the tests are run using the --inprocess flag:
When i add this flag the error changes to: inprocess_error.txt
I hope this information helps to identify the issue and doesn’t contain too much noise. If any further details are needed, I’m happy to assist.
Originally, I encountered this error when running the tests on TeamCity. However, I can reproduce it 1:1 locally as well.
We are currently upgrading NUnitConsole on our build server from version 3.17.0 to 3.20.1.
In one of our projects, we encountered the following error. I then tested with other NUnitConsole versions. It still works with 3.18.3 and 3.19.2. Only starting from 3.20.1 do I experience issues:
For each individual assembly, I also get the following message:
When i add this flag the error changes to: inprocess_error.txt
I hope this information helps to identify the issue and doesn’t contain too much noise. If any further details are needed, I’m happy to assist.