forkedProcessTimeoutInSeconds
可以设置为 0
,以防止 fork 测试虚拟机在指定时间后被假定为死亡。该属性的默认值是多少?
The documentation doesn't specify it ,NetBeans 中的 XML 自动完成显示 undefined
,这是没有意义的,因为只有将其设置为指定值或 0
才有意义。 A superficial look in the code表明该值必须在定义它的类之外设置。
弄清楚这一点并不是太重要,我更想确保我的 fork 过程正确并且可以提出改进建议。
最佳答案
因为 forkedProcessTimeoutInSeconds
是一个原始 int ,它本身默认为 0。通过属性设置的任何值 > 0 都会导致 ForkClient
设置该值的超时(以秒为单位)。
<forkedProcessTimeoutInSeconds>
Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.
来源:https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds
关于java - maven-surefire-plugin 的 forkedProcessTimeoutInSeconds 的默认值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45737977/