=== modified file 'cloudinit/ec2_utils.py'
--- cloudinit/ec2_utils.py 2015-03-02 20:41:16 +0000
+++ cloudinit/ec2_utils.py 2016-05-24 23:21:53 +0000
@@ -144,9 +144,10 @@
"""Returns if a request should retry based on a given set of codes that
case retrying to be stopped/skipped.
"""
- if cause.code in status_codes:
- return False
- return True
+ print("status_codes=%s" % status_codes)
+ print("_request_args=%s" % _request_args)
+ print("cause=%s" % cause)
+ return cause.code in status_codes
def get_instance_userdata(api_version='latest',
=== modified file 'test-requirements.txt'
--- test-requirements.txt 2016-05-24 23:08:14 +0000
+++ test-requirements.txt 2016-05-24 23:10:51 +0000
@@ -4,7 +4,7 @@
nose
# Only needed if you want to know the test times
-# nose-timer
+nose-timer
# Only really needed on older versions of python
contextlib2
=== modified file 'tests/unittests/test_merging.py'
--- tests/unittests/test_merging.py 2016-05-12 20:43:11 +0000
+++ tests/unittests/test_merging.py 2016-05-24 23:24:54 +0000
@@ -125,9 +125,9 @@
def test_seed_runs(self):
test_dicts = []
- for i in range(1, 50):
+ for i in range(1, 10):
base_dicts = []
- for j in range(1, 50):
+ for j in range(1, 10):
base_dicts.append(make_dict(5, i * j))
test_dicts.append(base_dicts)
for test in test_dicts:
=== modified file 'tox.ini'
--- tox.ini 2016-05-24 21:05:20 +0000
+++ tox.ini 2016-05-24 23:10:43 +0000
@@ -3,7 +3,7 @@
recreate = True
[testenv]
-commands = python -m nose {posargs:tests}
+commands = python -m nose --with-timer --timer-top-n=10 {posargs:tests}
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt