)]}'
{"tests/unit/test_shell.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cf69f94763665e0533a1cb7c9a674a7b4241ea20","unresolved":false,"context_lines":[{"line_number":1337,"context_line":"    def test_copy_two_objects_destination(self, connection):"},{"line_number":1338,"context_line":"        argv \u003d [\"\", \"copy\", \"container\", \"object\", \"object2\","},{"line_number":1339,"context_line":"                \"--meta\", \"Color:Blue\", \"--destination\", \"/c\"]"},{"line_number":1340,"context_line":"        connection.return_value.copy_object.return_value \u003d None"},{"line_number":1341,"context_line":"        swiftclient.shell.main(argv)"},{"line_number":1342,"context_line":"        calls \u003d ["},{"line_number":1343,"context_line":"            mock.call("}],"source_content_type":"text/x-python","patch_set":1,"id":"fa7ab95a_f13896f0","line":1340,"updated":"2016-08-29 17:55:58.000000000","message":"`connection` exists and is well-defined at the start of the function. `connection.return_value` and everything under it is mocked on-demand, though, which leads to problems when we\u0027ve got multiple threads that might instantiate the mocks. The code must look something like\n\n 1   if self._return_value is SENTINEL:\n 2       self._return_value \u003d ...\n 3   return self._return_value\n\nMost of the time, threads A and B are offset enough that exactly one of A or B executes line 2. Sometimes, however, they hit line 1 around the same time, *both* execute line 2, and each have separate ideas about what self._return_value should be.\n\nThis has come up several times before:\n\n* I52143a93c129764c02bba05267f3563c824e82cb\n* Ia82697c093529076b0bbcc6bccd577afdf0839e1\n* I810894545ca74d3b2f2dbde2d0388eb69c2ba710","commit_id":"18d7570e3b683bbecd5f48ed1c773e7420069d7a"}]}
