we are using fitnesse for acceptance testing of a complex web-based application. full suite would take several hours to pass, so we're using multiple processes. the setup is as follows:
- maven forks fitnesse server process
- maven makes http calls to fitnesse server
- fitnesse server forks a test runner for each call
- http call returns, go back to 2.
the command line to start jvm in 3. is built inside fitnesse jar based on http call parameters. meaning you can not pass in an arbitrary jvm argument, only ones that are supported.
now, the problem we're facing is that sometimes the process started in 3 hangs. it does not look like a timeout issue, because we have seen them hanging for multiple hours.
these jvm processes do not expose anything via jmx, so we can't connect to them using jconsole or alike. based on amounts of memory each process consumes (1-1.5G) i strongly suspect that OOM happens somewhere in the runner process and prevents it from exiting normally. also, trying "kill -3" on the server process produces
Exception in thread "CommandRunner stdOut" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332)
in what seems to be stdout from the started runner process, but i'm not sure.
the solution i'm currently thinging of is creating my copies of classes that control the command line so that every process is started with a randomized jmx port and a debug port, so if it hangs - can connect and investigate.
so, the question is - is there a better way to do it? am i missing something obvious here?