“Forked Java VM 异常退出"junit 测试中的错误 [英] "Forked Java VM exited abnormally" error from junit tests

查看:28
本文介绍了“Forked Java VM 异常退出"junit 测试中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在开发机器上单独运行时通过的 java junit 测试.我们还有一个 hudson 作业,它在带有 Java 1.5 的 Mac OS X 10.4 节点上运行通过 ant 调用的所有测试.该测试直到最近才通过 hudson 构建,但现在(没有相关代码更改)每次测试都失败并出现以下错误:

I have a java junit test that passes when run alone on a development machine. We also have a hudson job which runs all the tests, invoked via ant, on a Mac OS X 10.4 node with Java 1.5. The test was passing in the hudson build until recently but now (with no related code changes) one test fails everytime with the following error:

错误信息

分叉的 Java VM 异常退出.请注意报告中的时间不反映 VM 之前的时间退出.

Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.

堆栈跟踪

junit.framework.AssertionFailedError:Forked Java VM 异常退出.请注意报告中的时间不反映 VM 之前的时间退出.

junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.

谷歌搜索显示许多其他人似乎遇到了同样的问题,但我找不到任何答案.

googling shows many others seem to have run into the same problem but there I couldn't find any answer.

推荐答案

我遇到了类似的问题.我将 junit 测试作为 ant 任务运行.我添加了 showoutput="yes" ant junit 属性并运行了 ant junit 任务.然后它显示了导致分叉 jvm 退出的异常堆栈跟踪.

I faced a similar issue. I ran the junit tests as an ant task. I added the showoutput="yes" ant junit property and ran the ant junit task. It then showed the exception stack trace that caused the forked jvm to exit.

这篇关于“Forked Java VM 异常退出"junit 测试中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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