Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingrismore committed Mar 21, 2024
1 parent 4252b07 commit 7d0f7d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion prefect_kubernetes/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@ def _job_events(
"""
while True:
try:

return watch.stream(
func=batch_client.list_namespaced_job,
namespace=namespace,
Expand Down
8 changes: 3 additions & 5 deletions tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2637,12 +2637,10 @@ async def test_watch_handles_410(
_mock_pods_stream_that_returns_running_pod(),
]

job_list_1 = MagicMock(spec=kubernetes.client.V1JobList)
job_list_1.metadata.resource_version = "1"
job_list = MagicMock(spec=kubernetes.client.V1JobList)
job_list.metadata.resource_version = "1"

mock_batch_client.list_namespaced_job.side_effect = [
job_list_1,
]
mock_batch_client.list_namespaced_job.side_effect = [job_list]

# The job should not be completed to start
mock_batch_client.read_namespaced_job.return_value.status.completion_time = None
Expand Down

0 comments on commit 7d0f7d2

Please sign in to comment.