[test] add test to verify that failed TemporaryJob fails the test

Also a minor refactoring to make the else clause explicit as well
as a comment that hopefully explains the intent a tad better.