HRCPP-61 JniTest cleanup after exception is thrown to avoid hanging; fail the build if an exception is thrown