Add run_jobs tests, fix timeout query