mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
Resolve the random AssertionError
By doing a copy-new on the key, it seems to work around the random AssertionError's I've been seeing. Here's hoping this fully resolves it.
This commit is contained in:
parent
44cb2f256e
commit
c154d98b96
1 changed files with 3 additions and 7 deletions
|
@ -49,13 +49,7 @@ class SafeTransferGreenlet(gevent.Greenlet):
|
|||
# We don't want to retry, as it's time to exit, but we also don't want to count
|
||||
# this as a failure.
|
||||
return False
|
||||
except AssertionError as e:
|
||||
# If we've raised this damn gevent error, we simply need to retry.
|
||||
if e.args[0].startswith('This event is already used by another greenlet'):
|
||||
return True # retry
|
||||
# Different assertion error, so fail normally.
|
||||
result.setError(show_traceback=True)
|
||||
except Exception:
|
||||
except:
|
||||
result.setError(show_traceback=True)
|
||||
|
||||
result.markFinished()
|
||||
|
@ -76,6 +70,8 @@ class ReaderGreenlet(SafeTransferGreenlet):
|
|||
time.sleep(1)
|
||||
return self.result.setError('No available keys to test with reader. Try again later.')
|
||||
|
||||
# Copynew the key object
|
||||
key = key.bucket.new_key(key.name)
|
||||
self.key = key
|
||||
self.result.setKey(key)
|
||||
|
||||
|
|
Loading…
Reference in a new issue