mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
Merge pull request #12 from andrewgaul/short-write-disable-retries
Disable retries to test short writes Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
de985d8e14
1 changed files with 5 additions and 0 deletions
|
@ -344,6 +344,11 @@ def test_object_create_bad_contentlength_mismatch_above():
|
|||
|
||||
key = _setup_bad_object({'Content-Length': length})
|
||||
|
||||
# Disable retries since key.should_retry will discard the response with
|
||||
# PleaseRetryException.
|
||||
def no_retry(response, chunked_transfer): return False
|
||||
key.should_retry = no_retry
|
||||
|
||||
e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_string, content)
|
||||
eq(e.status, 400)
|
||||
eq(e.reason, 'Bad Request')
|
||||
|
|
Loading…
Reference in a new issue