Make the timeout value for java testing configurable #2299