运行测试后,nunit-console崩溃 [英] nunit-console crashes after running the tests

查看:152
本文介绍了运行测试后,nunit-console崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用nunit-console对Debian上的Mono应用程序进行单元测试.它运行所有测试,然后在报告失败的测试后崩溃. TestResult.xml不会生成.如果我将nunit-console-out-err参数一起使用,它将运行测试,然后崩溃,然后报告结果.

I'm using nunit-console for unit testing a Mono application on Debian. It runs all the tests and then crashes after reporting the failed tests. TestResult.xml is not generated. If I use nunit-console with either -out or -err argument, it runs the tests and then crashes before reporting the results.

另一个奇怪的事情是,如果我减少测试次数(从大约800到100),有时不会崩溃.抛出更多的测试用例似乎可以减少崩溃的可能性.

Another weird thing is that if I cut down the number of tests (from about 800 to 100) it sometimes wont crash. Throwing out even more testcases seems to decrease the chance of crashing.

平台:Debian 6,Mono 2.6.7,NUnit 2.4.7

Platform: Debian 6, Mono 2.6.7, NUnit 2.4.7

错误详细信息:

ERROR:../../mono/io-layer/handles-private.h:362:_wapi_handle_share_release: assertion failed: (info->handle_refs > 0)
Stacktrace:

at (wrapper managed-to-native) System.IO.MonoIO.Close (intptr,System.IO.MonoIOError&) <0x00050>
at (wrapper managed-to-native) System.IO.MonoIO.Close (intptr,System.IO.MonoIOError&) <0x00050>
at System.IO.FileStream.Dispose (bool) <0x000b7>
at System.IO.Stream.Close () <0x0001b>
at System.IO.StreamWriter.Dispose (bool) <0x000c8>
at System.IO.StreamWriter.Close () <0x0001b>
at NUnit.ConsoleRunner.ConsoleUi.Execute (NUnit.ConsoleRunner.ConsoleOptions) <0x007ed>
at NUnit.ConsoleRunner.Runner.Main (string[]) <0x00487>
at NUnit.ConsoleRunner.Class1.Main (string[]) <0x0000f>
at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00054>

Native stacktrace:

/usr/bin/cli() [0x487ad6]
/lib/libpthread.so.0(+0xeff0) [0x7fdd0379aff0]
/lib/libc.so.6(gsignal+0x35) [0x7fdd031da1b5]
/lib/libc.so.6(abort+0x180) [0x7fdd031dcfc0]
/lib/libglib-2.0.so.0(g_assertion_message+0x131) [0x7fdd03e175d1]
/lib/libglib-2.0.so.0(g_test_timer_start+0) [0x7fdd03e17b50]
/usr/bin/cli() [0x59d649]
/usr/bin/cli() [0x597658]
/usr/bin/cli() [0x597774]
/usr/bin/cli() [0x5095fc]
[0x4135b410]

Debug info from gdb:

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================


** (/usr/lib/nunit/nunit-console.exe:7436): WARNING **: process_set_termination_details: error looking up process handle 0x403

推荐答案

这是一个老错误

This is an old bug https://bugzilla.novell.com/show_bug.cgi?id=318809. I've not been able to find an up-to-date xamarin bug of this.

另请参见 https://stackoverflow.com/questions/4513928/处理带有多个单线程的单个文件.

因此,请尝试使用/nothread或更高版本运行nunit,请尝试使用mono 2.10.8.

So try running nunit with /nothread or better still, try mono 2.10.8.

这篇关于运行测试后,nunit-console崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆