【发布时间】:2012-02-06 15:54:28
【问题描述】:
我有一套 Junit 测试,每次我在本地运行时都会通过。我已经设置了一个运行套件的工作,hudson 使用 ANT 来调用测试。这个套件在 hudson 机器中传递了很长一段时间。但是从最近 3 天开始,一项测试有时会失败(随机)。而且我们没有更改为代码。错误是:
错误信息
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 exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
我在谷歌上找不到正确的答案。我查了here
但它似乎没有帮助。
哈德逊机详情: 视窗 2003 服务器 Java 1.6.0.29
【问题讨论】:
-
在博客上作者提到不要分叉新的 JVM,但在我的情况下这是不可能的。它可能看起来重复,但这个问题也有解决方案:)
-
在 hudson 构建项目时检查 ram 使用情况。我可能遇到了 java 错误。
-
尽可能使用 64 位版本。增加分叉的 java vm 的堆大小 (MX) 和 PermGen 大小。
-
您可能想多描述一下有问题的测试本身?任何并发问题?来自其他测试的不正确的上下文传播(例如,通过数据库或静态类成员的共享状态)?原生方法调用?