tag:help.appveyor.com,2012-11-13:/discussions/problems/693-nunit-test-suite-passes-but-runner-fails-when-exiting-failing-the-buildAppVeyor: Discussion 2018-08-25T01:47:44Ztag:help.appveyor.com,2012-11-13:Comment/342625142014-08-25T03:57:45Z2014-08-25T03:57:45ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>Is it every time and in the same place (same test)?</p>
<p>-Feodor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-25T04:16:17Z2014-08-25T04:16:17ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>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.</p>
<ul>
<li>Jackie</li>
</ul></div>jumpinjackietag:help.appveyor.com,2012-11-13:Comment/342625142014-08-25T15:30:08Z2014-08-25T15:52:00ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>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)</p>
<p><strong>EDIT : FINISHED with error that can be related, see post
below</strong></p></div>kristoffertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-25T15:49:46Z2014-08-25T15:57:27ZNUnit test suite passes, but runner fails when exiting failing the build<div><pre>
<code>27Test assembly: C:\projects\omnioc\OmnIOC.Tests\bin\Debug\OmnIoc.Tests.dll
28
29.System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The operation has timed out
30
31Server stack trace:
32 at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
33 at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data)
34 at System.Net.WebClient.UploadData(String address, String method, Byte[] data)
35 at Appveyor.BuildAgent.Api.BuildServices.UpdateTest(String testName, String testFramework, String fileName, TestOutcome outcome, Nullable`1 durationMilliseconds, String errorMessage, String errorStackTrace, String stdOut, String stdErr) in c:\Projects\Appveyor\appveyor\Appveyor.BuildAgent.Api\BuildServices.cs:line 107
36 at Xunit.ConsoleClient.AppveyorRunnerCallback.TestPassed(TestMethod method, TestPassedResult result)
37 at Xunit.ConsoleClient.RunnerCallback.TestFinished(TestMethod method)
38 at Xunit.TestAssembly.TestMethodRunnerCallbackWrapper.TestFinished(TestMethod testMethod)
39 at Xunit.TestClassCallbackDispatcher.TestFinished(String name, String type, String method)
40 at Xunit.XmlLoggerAdapter.LogTestNode(XmlNode testNode, IRunnerLogger logger)
41 at Xunit.XmlLoggerAdapter.LogNode(XmlNode node, IRunnerLogger logger)
42 at Xunit.TestClass.<>c__DisplayClassa.<RunTests>b__8(XmlNode node)
43 at Xunit.ExecutorWrapper.XmlNodeCallbackHandlerWithICallbackEventHandler.RaiseCallbackEvent(String result)
44 at Xunit.{Dynamic}.XmlNodeCallbackEventHandler.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
45 at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
46 at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
47
48Exception rethrown at [0]:
49 at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
50 at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
51 at System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
52 --- End of inner exception stack trace ---
53 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
54 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
55 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
56 at Xunit.Sdk.ExecutorCallback.CallbackEventHandlerCallback.Notify(String value)
57 at Xunit.Sdk.Executor.OnTestResult(ITestResult result, ExecutorCallback callback)
58 at Xunit.Sdk.Executor.RunTests.<>c__DisplayClass12.<.ctor>b__11(ITestResult result)
59 at Xunit.Sdk.TestClassCommandRunner.Execute(ITestClassCommand testClassCommand, List`1 methods, Predicate`1 startCallback, Predicate`1 resultCallback)
60 at Xunit.Sdk.Executor.RunTests.<>c__DisplayClass12.<.ctor>b__f()
61 at Xunit.Sdk.Executor.ThreadRunner(Object threadStart)
62 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
63 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preser</code>
</pre></div>kristoffertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-26T03:23:26Z2014-08-26T03:23:26ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>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?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-26T03:41:14Z2014-08-26T03:41:14ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>Hmmm, my build now passes when Platform is x64 but still fails
(nunit-console-x86 crash on exit) when Platform is x86</p>
<p><a href=
"https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.19">
https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.19</a></p></div>jumpinjackietag:help.appveyor.com,2012-11-13:Comment/342625142014-08-26T03:53:14Z2014-08-26T03:53:14ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>That's something with NUnit runner. Notice that there are 45
dots (<a href=
"https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.19/job/pwjjtmde9vkwmgqy">https://ci.appveyor.com/project/jumpinjackie/fdo-swig/build/0.1.0.1...</a>)
meaning all 45 tests passed. The error comes from "finalizing" code
of NUnit runner. <a href=
"https://www.google.com/search?q=nunit+System.Net.Sockets.SocketException%3A+No+connection+could+be+made+because+the+target+machine+actively+refused+it+127.0.0.1&oq=nunit+System.Net.Sockets.SocketException%3A+No+connection+could+be+made+because+the+target+machine+actively+refused+it+127.0.0.1&aqs=chrome..69i57.1397j0j4&sourceid=chrome&es_sm=122&ie=UTF-8#q=nunit-console+System.Net.Sockets.SocketException%3A+No+connection+could+be+made+because+the+target+machine+actively+refused+it+127.0.0.1">
Googling gives some similar cases</a>. When running tests against
x86 assembly the runner is different: nunit-console-x86.exe</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-26T03:57:45Z2014-08-26T03:59:01ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>Might be a problem with TearDown of some test...</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/342625142014-08-30T12:29:14Z2014-08-30T12:29:14ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>I ported my test suite over to xunit and disposed some objects
in my test code and my builds are passing now</p></div>jumpinjackietag:help.appveyor.com,2012-11-13:Comment/342625142014-08-30T15:16:39Z2014-08-30T15:16:39ZNUnit test suite passes, but runner fails when exiting failing the build<div><p>That's interesting. Thanks for the update.</p>
<p>While working with a different unit test frameworks I got a
feeling that xUnit is the most actual one.</p></div>Feodor Fitsner