Commit d18fb2a3 by rfkelly0

test_makedir_winner: account for possible ResourceLockedError

parent 82146f00
...@@ -673,7 +673,7 @@ class ThreadingTestCases: ...@@ -673,7 +673,7 @@ class ThreadingTestCases:
def removedir(): def removedir():
try: try:
self.fs.removedir("testdir") self.fs.removedir("testdir")
except ResourceNotFoundError, e: except (ResourceNotFoundError,ResourceLockedError), e:
errors.append(e) errors.append(e)
# One thread should succeed, one should error # One thread should succeed, one should error
self._runThreads(makedir,makedir) self._runThreads(makedir,makedir)
...@@ -696,7 +696,7 @@ class ThreadingTestCases: ...@@ -696,7 +696,7 @@ class ThreadingTestCases:
self._runThreads(makedir,removedir) self._runThreads(makedir,removedir)
if self.fs.isdir("testdir"): if self.fs.isdir("testdir"):
self.assertEquals(len(errors),1) self.assertEquals(len(errors),1)
self.assertTrue(isinstance(errors[0],ResourceNotFoundError)) self.assertFalse(isinstance(errors[0],DestinationExistsError))
self.fs.removedir("testdir") self.fs.removedir("testdir")
else: else:
self.assertEquals(len(errors),0) self.assertEquals(len(errors),0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment