Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ def wait_for_job(
if status == JobStatus.State.FAILED:
message = (
"Unexpected error in the operation: "
"Batch job with name {job_name} has failed its execution."
f"Batch job with name {job_name} has failed its execution."
)
raise AirflowException(message)
if status == JobStatus.State.DELETION_IN_PROGRESS:
message = (
"Unexpected error in the operation: Batch job with name {job_name} is being deleted."
f"Unexpected error in the operation: Batch job with name {job_name} is being deleted."
)
raise AirflowException(message)
time.sleep(polling_period_seconds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_wait_job_succeeded(self, mock_batch_service_client, state, cloud_batch_
def test_wait_job_does_not_succeed(self, mock_batch_service_client, state, cloud_batch_hook):
mock_job = self._mock_job_with_status(state)
mock_batch_service_client.return_value.get_job.return_value = mock_job
with pytest.raises(AirflowException):
with pytest.raises(AirflowException, match="job1"):
cloud_batch_hook.wait_for_job("job1")

@mock.patch(
Expand Down
Loading