-
-
Save bloodeagle40234/213df5b2ee8567958fe745172d609875 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/common/test_db_replicator.py b/test/unit/common/test_db_replicator.py | |
index a1a18fe..e8c5d19 100644 | |
--- a/test/unit/common/test_db_replicator.py | |
+++ b/test/unit/common/test_db_replicator.py | |
@@ -662,6 +662,12 @@ class TestDBReplicator(unittest.TestCase): | |
replicator._replicate_object('0', '/path/to/file', | |
replicator.ring.devs[3]['id']) | |
self.assertEqual(4, replicator._repl_to_node.call_count) | |
+ # even if it's the last handoff it works to keep 3 replicas | |
+ # 2 primaries + 1 handoff | |
+ replicator._repl_to_node = mock.Mock(side_effect=[DriveNotMounted()]) | |
+ replicator._replicate_object('0', '/path/to/file', | |
+ replicator.ring.devs[-1]['id']) | |
+ self.assertEqual(4, replicator._repl_to_node.call_count) | |
# with two DriveNotMounted exceptions called on +2 more replica keeping | |
# durability | |
replicator._repl_to_node = mock.Mock( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment