随机测试用例失败-分叉的JVM异常退出. [英] Randomly test case fails - Forked JVM exits abnormally.

查看:114
本文介绍了随机测试用例失败-分叉的JVM异常退出.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一套Junit测试,每次在本地运行时都会通过.我已经设置了一个作业来运行套件,哈德森使用ANT来调用测试.该套件在hudson机器中传递了相当长的一段时间.但是从最近三天开始,一项测试有时会失败(随机).而且我们还没有更改代码.错误是:

I have suite of Junit tests which passes every time I run locally. I have setup a job to run the suite, hudson uses ANT to invoke the tests.This suite was passing in the hudson machine for quite some time. But from last 3 days one test fails some times (randomly). And We have not changed to code. The error is :

错误消息

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

Stacktrace

Stacktrace

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

我在Google上找不到正确的答案.我在此处

I couldn't find proper answer on google. I checked here

但这似乎无济于事.

哈德逊机的详细信息: Windows 2003服务器 Java 1.6.0.29

Hudson machine details : Windows 2003 Server Java 1.6.0.29

推荐答案

您仍然可以访问失败的Hudson构建的控制台日志吗?如果JVM意外退出,您可能会发现JVM错误导致崩溃,该错误不会出现在JUnit日志中(我认为这是您从中获得错误消息/堆栈跟踪的位置),但可能会在Ant的输出中完成.

Do you still have access to the console log for the failed Hudson build? If the JVM is exiting 'unexpectedly' you may find a JVM bug is causing it to crash, which would not appear in the JUnit logs (which I assume is where you've got the error message/stack trace from), but probably would do in the output from Ant.

或者:

  • 您正在运行哪个版本的Ant?我听说过Ant 1.7.1之前的错误,在某些情况下会导致调用System.exit().
  • 您可能要检查您的代码是否捕获了不应该发生的任何异常(例如catch Throwable).
  • Which version of Ant are you running? I have heard of a bug pre-Ant 1.7.1 that caused System.exit() to be called under some circumstances.
  • You may want to check that your code is not catching any exceptions that it shouldn't be (e.g. catch Throwable).

这篇关于随机测试用例失败-分叉的JVM异常退出.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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