Closed boukeas closed 2 months ago
Would it be possible to add some tests for submit_job_attachment including ones for catching AttachmentError?
@plars Were you thinking of something in addition to test_submit_attachments_retries
, test_submit_attachments_no_retries
and test_submit_attachments_timeout
that are already included in the tests?
@boukeas I saw those and they are ok. But I was thinking it would be good to do something that called submit_job_attachments and covered the error paths that can return AttachmentError if possible
Description
When file upload through the CLI was interrupted by the user, then the job was not automatically cancelled, causing it to appear indefinitely as
waiting
on the server.Now
KeyboardInterrupt
is caught and raises anAttachmentError
, which in turn causes the job to be cancelled.Also included are a couple of very minor refinements, mostly relating to improved logging.
Tests
Submitted a job that involved a larger attachment and pressed Ctrl-C during the upload:
See result, verifying the job has been cancelled.