apache / apache/maven-surefire
[SUREFIRE-1441] Parallel Build Fork Timeout - Impossible To Find Bad Test
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[M A](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=m_a)** opened **[SUREFIRE-1441](https://issues.apache.org/jira/browse/SUREFIRE-1441?redirect=false)** and commented
In any maven project that contains more than a few modules, with a lot of tests, it's nearly impossible to understand from the build log what test caused a surefire fork timeout when there's only a message with the following line:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project \: There was a timeout or other error in the fork -> [Help 1]
In my case, we have a Maven project with more than 200 modules, and nearly 20k unit tests.
Lately we've noticed we don't fail our build upon surefire fork timeout, so we changed our build behavior (TeamCity in our case) to fail the build in case there was any timeout for some test.
But quickly afterwards when the build did start to fail on that issue, we came to understatement that it's impossible to find this needle in a haystack, and understand what test (not a specific `@Test` method, but just the test class name).
The error message should be more informative and contain useful information for debugging.
---
**Affects:** 2.19.1, 2.20.1
Contributor guide
Research direction
Start by reproducing a fork timeout in a Maven project using parallel builds and inspect the Surefire build-log output around the timeout. Trace how the fork timeout is reported and make the resulting error identify the failing test class; done means the log provides enough information to locate the bad test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100