Merge "Handle down object servers in container-sync"

This commit is contained in:
Jenkins 2012-11-02 05:44:45 +00:00 committed by Gerrit Code Review
commit d70d3092c0
2 changed files with 5 additions and 2 deletions

View File

@ -386,6 +386,8 @@ class ContainerSync(Daemon):
# the others errored for some other reason.
if not exc or exc.http_status == HTTP_NOT_FOUND:
exc = err
except (Exception, Timeout), err:
exc = err
if timestamp < looking_for_timestamp:
if exc:
raise exc

View File

@ -739,9 +739,10 @@ class TestContainerSync(unittest.TestCase):
'key', FakeContainerBroker('broker'), {'account': 'a',
'container': 'c'}))
self.assertEquals(cs.container_puts, 2)
self.assertEquals(len(exc), 1)
self.assertEquals(len(exc), 3)
self.assertEquals(str(exc[-1]), 'test exception')
exc = []
def fake_direct_get_object(node, part, account, container, obj,
resp_chunk_size=1):
exc.append(ClientException('test client exception'))
@ -754,7 +755,7 @@ class TestContainerSync(unittest.TestCase):
'key', FakeContainerBroker('broker'), {'account': 'a',
'container': 'c'}))
self.assertEquals(cs.container_puts, 2)
self.assertEquals(len(exc), 4)
self.assertEquals(len(exc), 3)
self.assertEquals(str(exc[-1]), 'test client exception')
def fake_direct_get_object(node, part, account, container, obj,