Closed hashhar closed 1 month ago
As pointed out by Piotr our TestNG listener also does this - see https://github.com/trinodb/trino/blob/master/testing/trino-testing-services/src/main/java/io/trino/testng/services/Listeners.java
We should first log
and the System.err
-- we need make sure thins get printed even if logging not configured proeprly.
We don't need to avoid JVM crash, since that class calls exit(1)
anyway.
Surefire when running tests in forked VMs doesn't expect things to be written to
System.out
orSystem.err
.Surefire uses the sysout and syserr streams to "talk" to the forked VMs and doesn't expect other processes to write to those.
See https://stackoverflow.com/questions/55272870/surefire-maven-plugin-corrupted-stdout-by-directly-writing-to-native-stream-in for more details.
e.g. https://github.com/starburstdata/starburst-enterprise/blob/5c4bf97b0182e1b99fc5bb8[…]sto/plugin/hive/benchmark/BenchmarkStarburstHiveFileFormat.java is one of the most common reasons for why hive-hadoop2 tests are often failing with this error now.
We should investigate tests that fail with
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
for whether they are using System.out or System.err and fix them.As pointed out by Piotr our TestNG listener also does this - see https://github.com/trinodb/trino/blob/master/testing/trino-testing-services/src/main/java/io/trino/testng/services/Listeners.java