在更新到MacOS Sierra之后,带有Surefire的Maven(TestNG)很慢 [英] Maven with Surefire (TestNG) is slow after update to MacOS Sierra

查看:126
本文介绍了在更新到MacOS Sierra之后,带有Surefire的Maven(TestNG)很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将MacBook Pro更新到MacOs Sierra之前,命令:

Before the update my MacBook Pro to MacOs Sierra, the command:

mvn clean install -U

运行大约40秒,在几个maven子模块中进行了数百次测试。

took about 40 sec to run, with several hundreds of tests in several maven sub-modules.

更新到MacOS Sierra后,如果没有更改代码,相同的命令将花费12分钟。在我看来,当Surefire插件打印当前模块的结果时,它会在继续之前挂起2-3分钟。到目前为止,测试执行的速度与更新MacOS Sierra之前的速度一样快。

After the update to MacOS Sierra, with no changes to the code, the same command takes over 12 minutes. It looks to me that the when the Surefire plugin is going to print the result of the current module, it hangs for 2-3 minutes before continuing. The speed of the test-execution up to this point is as fast as before the update to MacOS Sierra.

从模块开始的TestNG结果打印输出示例:

Example of a TestNG result printout from on of the modules:

Tests run: 101, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 167.854 sec

Results :

Tests run: 101, Failures: 0, Errors: 0, Skipped: 0

有谁知道这背后的原因?

Does anyone know the reasons behind this?

推荐答案

我遇到了这个问题(和花了最后6个小时试图解决它)。我的问题是我的HostName没有设置。

I've had this exact problem (and spent the last 6 hours trying to solve it). My problem was that my HostName wasn't set.

检查:

sudo scutil --get LocalHostName

匹配:

sudo scutil --get HostName

如果他们不这样做,请使用:

And if they don't, use:

sudo scutil --set HostName [YOUR_HOST_NAME]

要修复它。

这篇关于在更新到MacOS Sierra之后,带有Surefire的Maven(TestNG)很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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