Skip to content

Commit e06cf3f

Browse files
committed
Speed up slow S3 integration tests
* Fix test_can_delete_single_sse_c_object waiting ~100s for the object_exists waiter to fail. * Don't retry connection errors in test_verify_endpoint_url_is_used, which uses an endpoint with nothing listening.
1 parent 93b3608 commit e06cf3f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎tests/integration/customizations/s3/test_plugin.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,10 +2004,16 @@ def test_verify_endpoint_url_is_used(self):
20042004
# be in the debug logs. The other alternative is to actually
20052005
# watch what connections are made in the process, which is not
20062006
# easy.
2007+
# Nothing is listening on the endpoint, so don't retry the
2008+
# connection errors; only the debug logs are checked.
2009+
env_vars = os.environ.copy()
2010+
env_vars['AWS_DEFAULT_REGION'] = 'us-west-2'
2011+
env_vars['AWS_MAX_ATTEMPTS'] = '1'
20072012
p = aws(
20082013
's3 ls s3://dnscompat/ '
20092014
'--endpoint-url http://localhost:51515 '
2010-
'--debug'
2015+
'--debug',
2016+
env_vars=env_vars,
20112017
)
20122018
debug_logs = p.stderr
20132019
original_hostname = 'dnscompat.s3.amazonaws.com'
@@ -2295,7 +2301,7 @@ def test_can_delete_single_sse_c_object(
22952301
)
22962302
p = aws('s3 rm s3://%s/%s' % (shared_bucket, key))
22972303
self.assert_no_errors(p)
2298-
assert not s3_utils.key_exists(shared_bucket, key)
2304+
assert s3_utils.key_not_exists(shared_bucket, key)
22992305

23002306
def test_sse_c_upload_and_download_large_file(
23012307
self, files, s3_utils, encrypt_key, shared_bucket

0 commit comments

Comments
 (0)