Run kill -QUIT to obtain thread dump of java processes before killing them
If a Java process is stuck and the test times out and kills the Java process, it will be good to log the thread dump before killing the process. It will be good to do this for all cases, perhaps in kill_java_processes when clean_shutdown=True.
I think kill_java_processes and the like should at best be refactored to utilities as they are highly specific to the apps under test (for example, these do not work with librdkafka clients).
That said, I agree that some utilities that are smarter about specific types of processes would be handy -- something that handles the full shutdown procedure, from graceful, to dumping threads for debugging, to forceful shutdown in a java-specific way, would be great utilities to have when writing Java-specific Service implementations.