)]}'
{"manila/share/drivers/zfssa/zfssashare.py":[{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"99b56eacae63f330fb98ca1369ea15c7fc27b4ac","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        new_size_byte \u003d int(new_size) * units.Gi"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if used_space \u003e new_size_byte:"},{"line_number":292,"context_line":"            LOG.error(_LE(\u0027%(used).1fGB of share %(id)s is already used.\u0027"},{"line_number":293,"context_line":"                          \u0027Cannot shrink to %(newsize)dGB.\u0027),"},{"line_number":294,"context_line":"                      {\u0027used\u0027: float(used_space) / units.Gi,"},{"line_number":295,"context_line":"                       \u0027id\u0027: share[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_d2ba170a","line":292,"range":{"start_line":292,"start_character":71,"end_line":292,"end_character":73},"updated":"2016-02-25 02:49:42.000000000","message":"Need a space here.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"85da4c86d258f70a18d951e062f403ab1ca379a3","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        new_size_byte \u003d int(new_size) * units.Gi"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if used_space \u003e new_size_byte:"},{"line_number":292,"context_line":"            LOG.error(_LE(\u0027%(used).1fGB of share %(id)s is already used.\u0027"},{"line_number":293,"context_line":"                          \u0027Cannot shrink to %(newsize)dGB.\u0027),"},{"line_number":294,"context_line":"                      {\u0027used\u0027: float(used_space) / units.Gi,"},{"line_number":295,"context_line":"                       \u0027id\u0027: share[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_cb2a787e","line":292,"range":{"start_line":292,"start_character":71,"end_line":292,"end_character":73},"in_reply_to":"bae84128_d2ba170a","updated":"2016-02-25 19:17:08.000000000","message":"Done","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6520a88267de49e6e4ef2f722ebd2203c9f13581","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            raise exception.ShareShrinkingPossibleDataLoss("},{"line_number":298,"context_line":"                share_id\u003dshare[\u0027id\u0027])"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        arg \u003d self.create_arg(new_size)"},{"line_number":301,"context_line":"        self.zfssa.modify_share(lcfg.zfssa_pool, lcfg.zfssa_project,"},{"line_number":302,"context_line":"                                share[\u0027id\u0027], arg)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_c51f4559","line":300,"range":{"start_line":300,"start_character":19,"end_line":300,"end_character":29},"updated":"2016-02-24 00:23:56.000000000","message":"This method was probably named so because it was a \u0027create\u0027 arg. Now that you\u0027re reusing it, it looks very confusing..\n\nIf it bothers anyone else besides me, you should rename it .. probably to \u0027format_size\u0027 or something similar.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"180e0eebdfdc3236f712228e31652f64e4c234b6","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            raise exception.ShareShrinkingPossibleDataLoss("},{"line_number":298,"context_line":"                share_id\u003dshare[\u0027id\u0027])"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        arg \u003d self.create_arg(new_size)"},{"line_number":301,"context_line":"        self.zfssa.modify_share(lcfg.zfssa_pool, lcfg.zfssa_project,"},{"line_number":302,"context_line":"                                share[\u0027id\u0027], arg)"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_a0e2c1d2","line":300,"range":{"start_line":300,"start_character":19,"end_line":300,"end_character":29},"in_reply_to":"bae84128_c51f4559","updated":"2016-02-24 16:23:08.000000000","message":"Ravi, thanks for the comment.\n\nthis create_arg() function is used as it is, it\u0027s not a part of my change. A name change for the purpose of readability is out of scope of this fix.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"}],"manila/tests/share/drivers/zfssa/test_zfssashare.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"6520a88267de49e6e4ef2f722ebd2203c9f13581","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_65d63950","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"updated":"2016-02-24 00:23:56.000000000","message":"Most of the unit tests in manila are formatted like this:\n\n    def test_method_name_test_description_if_any(self, *args, **kwargs):\n \n         some_setup \u003d here\n         some_more_setup\n         mocks_1\n         mocks_2\n \n         method_call(args)\n \n         some_assertion_1\n         some_assertion_2\n\n\n\nor:\n\n     def test_method_name_some_exception(self, *args, **kwargs):\n \n         some_setup \u003d here\n         some_more_setup\n         mocks_1\n         mocks_2\n \n         self.assertRaises(exception_type, method_call, args)\n         some_assertion_1\n         some_assertion_2\n\n\nLooks more readable.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":11865,"name":"Clinton Knight","email":"cknight@netapp.com","username":"cknight"},"change_message_id":"99b56eacae63f330fb98ca1369ea15c7fc27b4ac","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_5213a70d","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_475add51","updated":"2016-02-25 02:49:42.000000000","message":"+1  Separate tests should be in separate methods.  A later patch set is fine for that.  And when you do that, it would be great if you could add spacing as Goutham suggests.  Using whitespace to separate unit tests into groups (mocks, call, asserts) greatly enhances readability.  Thanks!","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"85da4c86d258f70a18d951e062f403ab1ca379a3","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_4b10284f","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_5213a70d","updated":"2016-02-25 19:17:08.000000000","message":"Thank you for the comments. I\u0027ve incorporated the spacing in the patch set 7.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"328e9589219c71e3505a374e1b17c03e834e3557","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_cc6f3ec2","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_53a74da6","updated":"2016-02-24 16:54:51.000000000","message":"The nit was about spacing. However, i see that this file hasn\u0027t used that convention","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"180e0eebdfdc3236f712228e31652f64e4c234b6","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_53a74da6","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_65d63950","updated":"2016-02-24 16:23:08.000000000","message":"I am placing new mocks after setups to indicate the return value of the mocked object. My tests are written consistently in this way:\n- The mocked object to be asserted will come first.\n- Some setup\n- Set up of functions that need to have a mocked return value. This is different from the mocked object to be asserted above.\n- Function calls.\n- Assertions.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"3cd6f1038b1ece132891e6efb524b110e552ac13","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_c7638d40","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_c72eedf9","updated":"2016-02-24 19:50:56.000000000","message":"Thanks, we shouldn\u0027t test 2 things in the same unit test.. we have some usages in manila that we\u0027re going to have to rip out..","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"c3beffa0da3af4104f4ae207f5f879cfddecacb8","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_475add51","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_c7638d40","updated":"2016-02-24 19:54:48.000000000","message":"Thanks for the comments.\n\nCombined tests are usually negative tests, short and independent from each other. My team will revise the test file and do code clean-up if necessary in a separate patch set.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"},{"author":{"_account_id":13524,"name":"Diem Tran","email":"diem.tran@oracle.com","username":"dttran"},"change_message_id":"46dc3aae5c29cd97969e7502897d33bbbf83f821","unresolved":false,"context_lines":[{"line_number":227,"context_line":"            self.access)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_extend_share_negative(self):"},{"line_number":230,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"},{"line_number":231,"context_line":"        new_size \u003d 3"},{"line_number":232,"context_line":"        # Not enough space in project, expect an exception:"},{"line_number":233,"context_line":"        self.mock_object(self._driver.zfssa, \u0027get_project_stats\u0027)"},{"line_number":234,"context_line":"        self._driver.zfssa.get_project_stats.return_value \u003d 1 * units.Gi"},{"line_number":235,"context_line":"        self.assertRaises(exception.ShareExtendingError,"},{"line_number":236,"context_line":"                          self._driver.extend_share,"},{"line_number":237,"context_line":"                          self.share,"},{"line_number":238,"context_line":"                          new_size)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_extend_share(self):"},{"line_number":241,"context_line":"        self.mock_object(self._driver.zfssa, \u0027modify_share\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_c72eedf9","line":238,"range":{"start_line":230,"start_character":8,"end_line":238,"end_character":35},"in_reply_to":"bae84128_cc6f3ec2","updated":"2016-02-24 19:48:50.000000000","message":"Sometimes a test function will contain 2 tests, that\u0027s why there is such a convention. Different tests in one function will be separated by an empty line.","commit_id":"db3f0654e34fe7f7210a3b79ca3b470595814864"}]}
