首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nunit-console在运行测试后崩溃

nunit-console在运行测试后崩溃
EN

Stack Overflow用户
提问于 2012-03-14 17:54:17
回答 2查看 1K关注 0票数 0

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

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

平台:Debian6,Mono2.6.7,NUnit 2.4.7

错误详细信息:

代码语言:javascript
复制
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
EN

回答 2

Stack Overflow用户

发布于 2012-03-14 18:02:45

试着用/noshadow运行NUnit,我记得很久以前这是很有帮助的。

票数 0
EN

Stack Overflow用户

发布于 2012-03-15 15:30:36

这是一个旧的bug https://bugzilla.novell.com/show_bug.cgi?id=318809。我还没能找到关于这个的最新xamarin bug。

另请参见https://stackoverflow.com/questions/4513928/handling-single-file-with-multiple-threads-in-mono

所以试着用/nothread运行nunit,或者更好,试试mono 2.10.8。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9699541

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档