)]}'
{"manila/test.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"49ba55727bccfe12a1532014d890ccc5f417d588","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    def race_condition_check(self, obj_to_break, attr_to_break,"},{"line_number":364,"context_line":"                             func_to_call, *func_args, **func_kwargs):"},{"line_number":365,"context_line":"        \"\"\"Race condition check for unit tests"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"        This function basically sets a break point (mock) to a given point"},{"line_number":368,"context_line":"        and calls a different function. With this it is possibly to simulate"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_2b8a91bf","line":365,"updated":"2016-12-12 03:28:13.000000000","message":"nit: missing period at the end.","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"},{"author":{"_account_id":8851,"name":"Valeriy Ponomaryov","email":"kiparis.kh@gmail.com","username":"vponomaryov"},"change_message_id":"57e8e6b5de50122dfd08bcc781907030f1c44b85","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                         mock.Mock(side_effect\u003dcall_func))"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    def assert_lock_called_twice(self, lock_name):"},{"line_number":391,"context_line":"        coordination.synchronized.assert_has_calls("},{"line_number":392,"context_line":"            [mock.call(lock_name), mock.call(lock_name)])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_5860af35","line":392,"range":{"start_line":391,"start_character":8,"end_line":392,"end_character":57},"updated":"2016-12-09 14:42:19.000000000","message":"It does not verify that object called \"twice\". It verifies that it has these two calls among all calls.\n\n\"\"\"\ndef assert_lock_called(self, lock_name, expected_call_count\u003d2):\n    coordination.synchronized.assert_has_calls(\n        [mock.call(lock_name)] * expected_call_count)\n\"\"\"","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"}],"manila/tests/share/test_manager.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"578ef8c86fe9e93eee8c1d6f964fc3f177423452","unresolved":false,"context_lines":[{"line_number":837,"context_line":"        else:"},{"line_number":838,"context_line":"            self.assertFalse(mock_instance_get_call.called)"},{"line_number":839,"context_line":""},{"line_number":840,"context_line":"    def test_create_share_replica_race(self, has_snapshots\u003dTrue):"},{"line_number":841,"context_line":"        replica \u003d fake_replica("},{"line_number":842,"context_line":"            share_network\u003d\u0027\u0027, replica_state\u003dconstants.REPLICA_STATE_IN_SYNC)"},{"line_number":843,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_c0625dd8","line":840,"range":{"start_line":840,"start_character":45,"end_line":840,"end_character":63},"updated":"2016-11-23 12:51:00.000000000","message":"?","commit_id":"a0d6cb9077aaae4d3a94da16850e4e23cb871580"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"578ef8c86fe9e93eee8c1d6f964fc3f177423452","unresolved":false,"context_lines":[{"line_number":839,"context_line":""},{"line_number":840,"context_line":"    def test_create_share_replica_race(self, has_snapshots\u003dTrue):"},{"line_number":841,"context_line":"        replica \u003d fake_replica("},{"line_number":842,"context_line":"            share_network\u003d\u0027\u0027, replica_state\u003dconstants.REPLICA_STATE_IN_SYNC)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"        def call_again(*args, **kwargs):"},{"line_number":845,"context_line":"            self.share_manager.create_share_replica(self.context, replica)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_60aa69d6","line":842,"range":{"start_line":842,"start_character":26,"end_line":842,"end_character":28},"updated":"2016-11-23 12:51:00.000000000","message":"None","commit_id":"a0d6cb9077aaae4d3a94da16850e4e23cb871580"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"578ef8c86fe9e93eee8c1d6f964fc3f177423452","unresolved":false,"context_lines":[{"line_number":849,"context_line":"            self.synchronized_lock_decorator_call.return_value,"},{"line_number":850,"context_line":"            exception.ManilaException(\u0027function locked\u0027))"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"        self.mock_object(db, \u0027share_replica_get\u0027,"},{"line_number":853,"context_line":"                         mock.Mock(side_effect\u003dcall_again))"},{"line_number":854,"context_line":""},{"line_number":855,"context_line":"        self.assertRaises(exception.ManilaException,"},{"line_number":856,"context_line":"                          self.share_manager.create_share_replica,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a74a57a_000535c1","line":853,"range":{"start_line":852,"start_character":7,"end_line":853,"end_character":59},"updated":"2016-11-23 12:51:00.000000000","message":"This is clever :) but we should add a comment above to say why we\u0027re mocking the side effect of a seemingly unrelated \"share_replica_get\" \n\nsomething along the lines of: \"Inject a call to the same method with the help of code that\u0027s in the method\". would help other people think of writing similar tests when testing concurrency control approaches...","commit_id":"a0d6cb9077aaae4d3a94da16850e4e23cb871580"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a7eb69bfa338d9fadda5ae785f400c150107e627","unresolved":false,"context_lines":[{"line_number":841,"context_line":"    def test_create_share_replica_race(self):"},{"line_number":842,"context_line":"        replica \u003d fake_replica("},{"line_number":843,"context_line":"            share_network\u003dNone, replica_state\u003dconstants.REPLICA_STATE_IN_SYNC)"},{"line_number":844,"context_line":"        lock_name \u003d \"locked-share-replica-operation-for-share-None\""},{"line_number":845,"context_line":"        self.race_condition_check(db, \u0027share_replica_get\u0027,"},{"line_number":846,"context_line":"                                  self.share_manager.create_share_replica,"},{"line_number":847,"context_line":"                                  self.context, replica)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_40b9f4e8","line":844,"range":{"start_line":844,"start_character":62,"end_line":844,"end_character":66},"updated":"2016-12-01 14:28:55.000000000","message":"%s\" % replica[\u0027share_id\u0027]","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a7eb69bfa338d9fadda5ae785f400c150107e627","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"        self.assertRaises(exception.InUse,"},{"line_number":850,"context_line":"                          self.share_manager.create_share_replica,"},{"line_number":851,"context_line":"                          self.context, replica)"},{"line_number":852,"context_line":"        self.assert_lock_called_twice(lock_name)"},{"line_number":853,"context_line":""},{"line_number":854,"context_line":"    def test_create_delete_share_replica_race(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_c0eee4eb","line":851,"range":{"start_line":851,"start_character":47,"end_line":851,"end_character":48},"updated":"2016-12-01 14:28:55.000000000","message":", share_id\u003dreplica[\u0027share_id\u0027]","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a7eb69bfa338d9fadda5ae785f400c150107e627","unresolved":false,"context_lines":[{"line_number":854,"context_line":"    def test_create_delete_share_replica_race(self):"},{"line_number":855,"context_line":"        replica \u003d fake_replica("},{"line_number":856,"context_line":"            share_network\u003dNone, replica_state\u003dconstants.REPLICA_STATE_IN_SYNC)"},{"line_number":857,"context_line":"        lock_name \u003d \"locked-share-replica-operation-for-share-None\""},{"line_number":858,"context_line":"        self.race_condition_check(db, \u0027share_replica_get\u0027,"},{"line_number":859,"context_line":"                                  self.share_manager.delete_share_replica,"},{"line_number":860,"context_line":"                                  self.context, replica)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_00a61cc1","line":857,"range":{"start_line":857,"start_character":62,"end_line":857,"end_character":67},"updated":"2016-12-01 14:28:55.000000000","message":"same","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a7eb69bfa338d9fadda5ae785f400c150107e627","unresolved":false,"context_lines":[{"line_number":857,"context_line":"        lock_name \u003d \"locked-share-replica-operation-for-share-None\""},{"line_number":858,"context_line":"        self.race_condition_check(db, \u0027share_replica_get\u0027,"},{"line_number":859,"context_line":"                                  self.share_manager.delete_share_replica,"},{"line_number":860,"context_line":"                                  self.context, replica)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"        self.assertRaises(exception.InUse,"},{"line_number":863,"context_line":"                          self.share_manager.create_share_replica,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_40b014f5","line":860,"range":{"start_line":860,"start_character":55,"end_line":860,"end_character":56},"updated":"2016-12-01 14:28:55.000000000","message":"same","commit_id":"ffe5a506d7ae17259046d8ec2b5213cf5c932229"}]}
