Created
April 14, 2015 07:06
-
-
Save clayg/c2ee5a252a042ce19497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/unit/obj/test_reconstructor.py b/test/unit/obj/test_reconstructor.py | |
index 8b4a201..22f0531 100755 | |
--- a/test/unit/obj/test_reconstructor.py | |
+++ b/test/unit/obj/test_reconstructor.py | |
@@ -2461,7 +2461,7 @@ class TestObjectReconstructor(unittest.TestCase): | |
# sanity check before negative test | |
with mocked_http_conn(*codes, body_iter=body_iter, headers=headers): | |
df = self.reconstructor.reconstruct_fa( | |
- job, node, metadata) | |
+ job, node, dict(metadata)) | |
fixed_body = ''.join(df.reader()) | |
self.assertEqual(len(fixed_body), len(broken_body)) | |
self.assertEqual(md5(fixed_body).hexdigest(), | |
@@ -2472,12 +2472,12 @@ class TestObjectReconstructor(unittest.TestCase): | |
'X-Object-Sysmeta-Ec-Etag': 'some garbage', | |
'X-Backend-Timestamp': next(ts).internal, | |
}) | |
- new_index = random.randint(0, len(responses) - 2) | |
+ new_index = random.randint(0, len(responses) - self.policy.ec_nparity) | |
responses[new_index] = new_response | |
codes, body_iter, headers = zip(*responses) | |
with mocked_http_conn(*codes, body_iter=body_iter, headers=headers): | |
self.assertRaises(DiskFileError, self.reconstructor.reconstruct_fa, | |
- job, node, metadata) | |
+ job, node, dict(metadata)) | |
if __name__ == '__main__': |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment