azure-sdk-for-python
azure-sdk-for-python copied to clipboard
Restarting failed job can fix python - storage - ci pipeline failure
https://dev.azure.com/azure-sdk/public/_build/results?buildId=803085&view=ms.vss-test-web.build-test-results-tab

the failure is because: in the below code block, with open(file_name, 'rb') as stream: cannot find this file blob_strict_mode.temp.dat (which seems get deleted by another running test?), while that file is just created by this line with open(file_name, 'wb') as stream:.
file_name = 'blob_strict_mode.temp.dat'
with open(file_name, 'wb') as stream:
stream.write(content)
with open(file_name, 'rb') as stream:
with self.assertRaises(ValueError):
blob.upload_blob(stream, blob_type=service)
Test should use tmpfile, and not a hardcoded file. If filename is required, then a tmpdir. Since it's on the test design side, re-assigning from engsys to storage crew.
Reviving this item as we still see some issues with local files occasionally so would be good to switch to tmpfile or alike as Laurent has suggested.
Hi @xiafu-msft, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.