Fix job status handling on exception for tests