[
https://issues.apache.org/jira/browse/SUREFIRE-1722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Bergqvist updated SUREFIRE-1722:
-------------------------------------
Description:
I frequently encounter situations where after setting the
forkedProcessTimeoutInSeconds property, a JVM with a test that hangs is not
killed after the settings have elapsed.
I have attached the particular test
(tika-example/src/test/java/org/apache/tika/example/DirListParserTest.java),
which is is used as an example to demonstrate a test that causes the JVM to
hang, and have configured my surefire plugin as follows (junit 4.12):
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<enableProcessChecker>all</enableProcessChecker>
<forkCount>0.5C</forkCount>
<forkedProcessTimeoutInSeconds>5</forkedProcessTimeoutInSeconds>
<forkedProcessExitTimeoutInSeconds>5</forkedProcessExitTimeoutInSeconds>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
{code}
was:
I frequently encounter situations where after setting the
forkedProcessTimeoutInSeconds property, a JVM with a test that hangs is not
killed after the settings have elapsed.
I have attached the particular test
(tika-example/src/test/java/org/apache/tika/example/DirListParserTest.java),
which should hang indefinitely, and have configured my surefire plugin as
follows (junit 4.12):
{code:xml}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<enableProcessChecker>all</enableProcessChecker>
<forkCount>0.5C</forkCount>
<forkedProcessTimeoutInSeconds>5</forkedProcessTimeoutInSeconds>
<forkedProcessExitTimeoutInSeconds>5</forkedProcessExitTimeoutInSeconds>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
{code}
> JVM is not killed after forkedProcessTimeoutInSeconds has elapsed
> -----------------------------------------------------------------
>
> Key: SUREFIRE-1722
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1722
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 3.0.0-M4
> Environment: Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64
> Apache Maven 3.3.9
> Maven home: /usr/share/maven
> Java version: 1.8.0_232, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.9.0-9-amd64", arch: "amd64", family: "unix"
> Reporter: John Bergqvist
> Priority: Major
> Attachments: DirListParserTest.java
>
>
> I frequently encounter situations where after setting the
> forkedProcessTimeoutInSeconds property, a JVM with a test that hangs is not
> killed after the settings have elapsed.
> I have attached the particular test
> (tika-example/src/test/java/org/apache/tika/example/DirListParserTest.java),
> which is is used as an example to demonstrate a test that causes the JVM to
> hang, and have configured my surefire plugin as follows (junit 4.12):
>
> {code:xml}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>3.0.0-M4</version>
> <configuration>
> <enableProcessChecker>all</enableProcessChecker>
> <forkCount>0.5C</forkCount>
> <forkedProcessTimeoutInSeconds>5</forkedProcessTimeoutInSeconds>
>
> <forkedProcessExitTimeoutInSeconds>5</forkedProcessExitTimeoutInSeconds>
> <reuseForks>false</reuseForks>
> </configuration>
> </plugin>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)