You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the stestr unit tests in the test_return_codes module in a windows environment we encountered a failure in cleanup trying to remove the temporary directory created to setup the functional environment:
==============================
Failed 1 tests - output below:
==============================
stestr.tests.test_return_codes.TestReturnCodes.test_until_failure_fails_from_func
---------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
b'Traceback (most recent call last):'
b' File "C:\\projects\\stestr\\.tox\\py36\\lib\\shutil.py", line 494, in rmtree'
b' return _rmtree_unsafe(path, onerror)'
b' File "C:\\projects\\stestr\\.tox\\py36\\lib\\shutil.py", line 393, in _rmtree_unsafe'
b' onerror(os.rmdir, path, sys.exc_info())'
b' File "C:\\projects\\stestr\\.tox\\py36\\lib\\shutil.py", line 391, in _rmtree_unsafe'
b' os.rmdir(path)'
b"PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\Users\\\\appveyor\\\\AppData\\\\Local\\\\Temp\\\\1\\\\stestr-unitriyexd7t'"
b''
It looks like the subprocess stestr is still accessing the temporary directory, but it definitely should have exited by the time cleanup is running. So it's not clear why this is failing. It also passed the other 2 jobs on the appveyor build which run the same tests, just with different python versions.
The text was updated successfully, but these errors were encountered:
This commit is an attempt to mitigate #162 where the temp directory
removal is failing on windows CI occasionally. This commit sets the
ignore_errors flag on the shutil.rmtree() call which makes any errors
encountered not fatal. While this isn't ideal because it could result
in leaking the temp directories on test runs. But, since we haven't
encountered this failure on any operating system or environment
besides the windows CI in appveyor the risk of that weighed against
the nondeterministic failures blocking changes minimizes that concern.
Issue description
When running the stestr unit tests in the test_return_codes module in a windows environment we encountered a failure in cleanup trying to remove the temporary directory created to setup the functional environment:
https://ci.appveyor.com/project/mtreinish/stestr/build/1.0.478/job/k9bm98380del4g2x
In case that link ever dies the trace back is:
It looks like the subprocess stestr is still accessing the temporary directory, but it definitely should have exited by the time cleanup is running. So it's not clear why this is failing. It also passed the other 2 jobs on the appveyor build which run the same tests, just with different python versions.
The text was updated successfully, but these errors were encountered: