Ensure exceptions from JUnit tests are logged
Merge pull request #2535 from benmccann/test-errors-2.2.x

Ensure exceptions from JUnit tests are logged