← Back to team overview

nunit-core team mailing list archive

[Bug 602761] Re: nunit-agent hangs after tests complete

 

I believe we are seeing the same issue every so often, I'm grabbing the
source to try the fix suggested by Andy Lindeman. Because the issue is
transient it maybe hard to tell if the suggested fix actually worked.
Here's our environment encase this helps:

NUnit Release: 2.5.7.10213
OS: Windows Server 2008R2
CLR Version (As reported by Help->About NUnit in the GUI): 2.0.50727.4952

All of our Test Assemblies are built against .NET 4.0.30319 and forced
x86. We're using the nunit-console-x86 application to run our unit tests
with the following arguments:

"C:\Program Files (x86)\NUnit 2.5.7\bin\net-2.0\nunit-console-x86.exe"
/nologo C:\BuildOutput\Release\SomeUnitTest.dll /include=Smoke
/xml=C:\BuildOutput\Release\SomeUnitTest.dll.TestResult.xml
/framework=4.0.30319

This seems to have become more prominate since our swtich to .NET 4.0,
although this could be a concidence.

-- 
nunit-agent hangs after tests complete
https://bugs.launchpad.net/bugs/602761
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: Confirmed

Bug description:
If a test fixture is being run in a different process (using nunit-agent), every now and then nunit-console will print out the results of the tests and exit, but the nunit-agent process will hang around indefinitely.

I believe the issue is with .NET Remoting, specifically the TestAgent/RemoteTestAgent.Stop operations.  Stop is marked as a one-way call, which tells the .NET Framework that the call can be completed asynchronously.  However, this also means that when nunit-console exits immediately after calling Stop, the message may never actually be sent to the nunit-agent.

Recommend removing the OneWay attribute so that the call is completed synchronously and thereby guaranteed to be delivered.





Follow ups

References