Problem: Using global variables for WaitFor(). Solution: Use a lambda function instead. Don't check a condition if WaitFor() already checked it.
Problem: Test_job_start_fails() is expected to report memory leaks, making it hard to see other leaks in test_partial. Solution: Move Test_job_start_fails() to a separate test file.