NUnit test suite passes, but runner fails when exiting failing the build
Hi,
I just set up a new project on AppVeyor, the NUnit test suite passes but the runner crashes on exit causing the whole build to be marked as failed.
Here's a sample of the output:
258NUnit-Console version 2.6.3.13283
259Copyright (C) 2002-2012 Charlie Poole.
260Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
261Copyright (C) 2000-2002 Philip Craig.
262All Rights Reserved.
263
264Runtime Environment -
265 OS Version: Microsoft Windows NT 6.2.9200.0
266 CLR Version: 2.0.50727.8000 ( Net 3.5 )
267
268ProcessModel: Default DomainUsage: Single
269Execution Runtime: net-3.5
270.............................................Unhandled Exception:
271System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:1041
272
273Server stack trace:
274 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
275 at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
276 at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
277 at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
278 at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
279 at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
280 at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
281 at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
282 at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
283
284Exception rethrown at [0]:
285 at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
286 at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
287 at System.IDisposable.Dispose()
288 at NUnit.Core.ProxyTestRunner.Dispose()
289 at NUnit.Util.ProcessRunner.Dispose()
290 at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
291 at NUnit.ConsoleRunner.Runner.Main(String[] args)
292Command exited with code -100
Full build output here: https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/job/ve20ew74a5t3gl7i
Any idea what's going on here? My test suite does not use or make any socket connections.
- Jackie
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 25 Aug, 2014 03:57 AM
Is it every time and in the same place (same test)?
-Feodor
2 Posted by jumpinjackie on 25 Aug, 2014 04:16 AM
Yes, it's happening every build since I got the tests set up. The port number in question may change (some failed builds the port number was 1040 instead of 1041), but the crash and stack trace is consistent.
- Jackie
3 Posted by kristoffer on 25 Aug, 2014 03:30 PM
Same here for Xunit but never finishes, all tests are reported as green and then nothing more happens (waited 13min for a project that usually takes 2min before hitting cancel)
EDIT : FINISHED with error that can be related, see post below
4 Posted by kristoffer on 25 Aug, 2014 03:49 PM
Support Staff 5 Posted by Feodor Fitsner on 26 Aug, 2014 03:23 AM
There were some issues with one of AV web servers. Everything is fixed now. To exclude the chance these problems are related are you able to reproduce your issue now?
6 Posted by jumpinjackie on 26 Aug, 2014 03:41 AM
Hmmm, my build now passes when Platform is x64 but still fails (nunit-console-x86 crash on exit) when Platform is x86
https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.19
Support Staff 7 Posted by Feodor Fitsner on 26 Aug, 2014 03:53 AM
That's something with NUnit runner. Notice that there are 45 dots (https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.1...) meaning all 45 tests passed. The error comes from "finalizing" code of NUnit runner. Googling gives some similar cases. When running tests against x86 assembly the runner is different: nunit-console-x86.exe
Support Staff 8 Posted by Feodor Fitsner on 26 Aug, 2014 03:57 AM
Might be a problem with TearDown of some test...
9 Posted by jumpinjackie on 30 Aug, 2014 12:29 PM
I ported my test suite over to xunit and disposed some objects in my test code and my builds are passing now
Support Staff 10 Posted by Feodor Fitsner on 30 Aug, 2014 03:16 PM
That's interesting. Thanks for the update.
While working with a different unit test frameworks I got a feeling that xUnit is the most actual one.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:47 AM.