Skip to content

Commit d40ba14

Browse files
committed
Fix test
1 parent e0fbd33 commit d40ba14

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

v03_pipeline/lib/tasks/dataproc/base_run_job_on_dataproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def complete(self) -> bool:
6161
google.cloud.dataproc_v1.types.jobs.JobStatus.State.ERROR,
6262
google.cloud.dataproc_v1.types.jobs.JobStatus.State.ATTEMPT_FAILURE,
6363
}:
64-
msg = f'Job {self.task.task_family}-{self.run_id} entered {job.status.state!s} state'
64+
msg = f'Job {self.task.task_family}-{self.run_id} entered {job.status.state.name} state'
6565
logger.error(msg)
6666
logger.error(job.status.details)
6767
return (

v03_pipeline/lib/tasks/dataproc/create_dataproc_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def complete(self) -> bool:
171171
google.cloud.dataproc_v1.types.clusters.ClusterStatus.State.ERROR_DUE_TO_UPDATE,
172172
}:
173173
msg = (
174-
f'Cluster {cluster.cluster_name} entered {cluster.status.state!s} state'
174+
f'Cluster {cluster.cluster_name} entered {cluster.status.state.name} state'
175175
)
176176
logger.error(msg)
177177
# This will return False when the cluster is "CREATING"

v03_pipeline/lib/tasks/dataproc/run_pipeline_on_dataproc_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_job_already_exists_failed(
5555
mock_logger.error.assert_has_calls(
5656
[
5757
call(
58-
'Job RunPipelineTask-manual__2024-04-03 entered State.ERROR state',
58+
'Job RunPipelineTask-manual__2024-04-03 entered ERROR state',
5959
),
6060
],
6161
)

0 commit comments

Comments
 (0)