[ARVADOS] created: 5862c01a952d410b1237dc2a4a86cb844652a8d0

Git user git at public.curoverse.com
Thu Jun 16 19:05:52 EDT 2016


        at  5862c01a952d410b1237dc2a4a86cb844652a8d0 (commit)


commit 5862c01a952d410b1237dc2a4a86cb844652a8d0
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Wed Jun 15 18:45:10 2016 -0300

    First try, don't think it'll work

diff --git a/sdk/python/tests/test_keep_client.py b/sdk/python/tests/test_keep_client.py
index 5fbab7d..eff344c 100644
--- a/sdk/python/tests/test_keep_client.py
+++ b/sdk/python/tests/test_keep_client.py
@@ -1064,6 +1064,18 @@ class KeepClientRetryPutTestCase(KeepClientRetryTestMixin, unittest.TestCase):
         with tutil.mock_keep_responses(self.DEFAULT_EXPECT, 200):
             self.check_exception(copies=2, num_retries=3)
 
+# @tutil.skip_sleep
+class KeepClientAvoidClientOverreplicationTestCase(unittest.TestCase, tutil.ApiClientMock):
+    def setUp(self):
+        self.api_client = self.mock_keep_services(count=4)
+        self.keep_client = arvados.KeepClient(api_client=self.api_client)
+
+    def test_only_send_enough_on_success(self):
+        with tutil.mock_keep_responses(
+                'acbd18db4cc2f85cedef654fccc4a4d8+3',
+                200, 200, 200, 200) as req_mock:
+            self.keep_client.put('foo', num_retries=1, copies=2)
+        self.assertEqual(3, req_mock.call_count)
 
 @tutil.skip_sleep
 class RetryNeedsMultipleServices(unittest.TestCase, tutil.ApiClientMock):

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list