使用SureFire插件的麻烦: - “分叉的虚拟机终止而没有说再见。 VM崩溃或System.exit调用? " [英] Troubles with SureFire plugin: -"The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? "

查看:1067
本文介绍了使用SureFire插件的麻烦: - “分叉的虚拟机终止而没有说再见。 VM崩溃或System.exit调用? "的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在发生异常后运行单元测试时:

While running of unit tests following exception occurs:

org.apache.maven.lifecycle.LifecycleExecutionException: ExecutionException; nested exception is java.util.concurrent.ExecutionException: java.lang.RuntimeException: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

有什么建议吗?

推荐答案


有什么建议吗?

Any suggestions?

异常的错误信息可能解释了发生了什么。你的一个单元测试有

The exception's error message probably explains what is going on. One of your unit tests has either


  • 名为 System.exit(),或者

  • 打破了单元测试工具,或者

  • 做了一些已经崩溃了运行它的JVM的东西。

  • called System.exit(), or
  • broken the unit test harness, or
  • done something that has crashed the JVM in which it was running.

我们无法告诉你它是什么。

We cannot tell you which it was.

(我想这个问题正在报道,因为maven JVM期望子JVM将单元测试结果写入其标准输出。从孩子那里得到的东西是缺少说单元测试已经完成的消息(或者其他什么)。根本原因可能是与建议的替代方案不同,但我对此表示怀疑,并且毫无意义推测......)

(I imagine that the problem is being reported because the maven JVM was expecting the child JVM to write the unit test results to its standard output. What it got back from the child was missing the message (or whatever) that said that the unit tests had finished. It is possible that the root cause might be different from the alternatives suggested, but I doubt it, and it is pointless speculating ...)

在违规单元测试的日志文件中可能有更多信息。检查/他们。

There is possibly more information in the logfile for the offending unit test. Check that / them.

这篇关于使用SureFire插件的麻烦: - “分叉的虚拟机终止而没有说再见。 VM崩溃或System.exit调用? "的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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