Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Write output from JUnit ConsoleRunner when process is terminated #7799
Pants enforces test timeouts for JVM JUnit tests by terminating the JVM process (usually sending SIGINT). When this happens today, test output is not consistently written out. In particular, XML output from AntJunitXmlReportListener will not be written.
Unfortunately, this means test tooling that relies on this XML cannot accurately report test results when the global timeout (usually set with --test-junit-timeout-default) is reached.
Add a JVM shutdown hook to write out test results on JVM termination.
JUnit test results are available even when Pants times out on a given test run.
This branch also makes the following changes in support of this: