Skip to content

Instantly share code, notes, and snippets.

@clayg
Last active September 22, 2016 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/5bc36a69b4f22de7fdb688d73af1de12 to your computer and use it in GitHub Desktop.
Save clayg/5bc36a69b4f22de7fdb688d73af1de12 to your computer and use it in GitHub Desktop.
ChunkWriteTimeout
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 9e1a4b0..6f5a7bb 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -2438,10 +2438,14 @@ class TestObjectController(unittest.TestCase):
raise Exception("doom ba doom")
def explodey_doc_parts_iter(inner_iter_iter):
- for item in inner_iter_iter:
- item = item.copy() # paranoia about mutable data
- item['part_iter'] = explodey_iter(item['part_iter'])
- yield item
+ try:
+ for item in inner_iter_iter:
+ item = item.copy() # paranoia about mutable data
+ item['part_iter'] = explodey_iter(item['part_iter'])
+ yield item
+ except GeneratorExit:
+ inner_iter_iter.close()
+ raise
real_ec_app_iter = swift.proxy.controllers.obj.ECAppIter
nosetests swift/test/unit/proxy/test_server.py:TestObjectController.test_GET_ec_failure_handling -vsx
diff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py
index 9e1a4b0..ec3676c 100644
--- a/test/unit/proxy/test_server.py
+++ b/test/unit/proxy/test_server.py
@@ -2488,6 +2488,7 @@ class TestObjectController(unittest.TestCase):
# Ensure we failed partway through, otherwise the mocks could
# get out of date without anyone noticing
self.assertTrue(0 < len(gotten_obj) < len(obj))
+ sleep(60)
@unpatch_policies
def test_HEAD_ec(self):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment