)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Mocks are an anti-pattern*:"},{"line_number":10,"context_line":"[1] http://goo.gl/LtvpR7"},{"line_number":11,"context_line":"[2] https://www.youtube.com/watch?v\u003dXu5EhKVZdV8"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_90ee17eb","line":11,"updated":"2015-04-30 01:49:05.000000000","message":"Just because people blog or give fancy presentation doesn\u0027t make them right!","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1f9869804e318088a37f38e33f98871a9a7c1f8a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Mocks are an anti-pattern*:"},{"line_number":10,"context_line":"[1] http://goo.gl/LtvpR7"},{"line_number":11,"context_line":"[2] https://www.youtube.com/watch?v\u003dXu5EhKVZdV8"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_e641153b","line":11,"in_reply_to":"3acd31a7_060e5134","updated":"2015-04-30 02:44:35.000000000","message":"Are Tempest API tests invalid as well? Scenario tests? I agree that high level tests without supporting low level tests are not effective (If only because they tell you that something went wrong, but not what), but it seems like you\u0027re saying that all high level tests are just generally invalid.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Mocks are an anti-pattern*:"},{"line_number":10,"context_line":"[1] http://goo.gl/LtvpR7"},{"line_number":11,"context_line":"[2] https://www.youtube.com/watch?v\u003dXu5EhKVZdV8"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_a31aef15","line":11,"in_reply_to":"3acd31a7_90ee17eb","updated":"2015-04-30 02:06:35.000000000","message":"I\u0027ll give one general reply here:\n\nThe reason I called the new tests \u0027unit tests\u0027 is not being I think they\u0027re unit tests (They\u0027re clearly not), but because they\u0027re going under the tests/unit folder. They are higher level tests than currently exist, and are not a replacement for lower level tests that test the DB layer in isolation. Better lower level tests would indeed be great, you don\u0027t have to convince me. It would require a lot of effort to rewrite a lot of the code to be able to do that, and that\u0027s not something I\u0027d like to do *right now*. That being said, adding higher level tests doesn\u0027t forbid us from adding lower level tests at a later time.\n\nIf removing the current tests is a source of pushback, what do you think about renaming the new tests (Integration?), moving them to some place appropriate, and not deleting the old ones?","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e184f591eefebe06ffedd1af3d6a2fca9efeed62","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Mocks are an anti-pattern*:"},{"line_number":10,"context_line":"[1] http://goo.gl/LtvpR7"},{"line_number":11,"context_line":"[2] https://www.youtube.com/watch?v\u003dXu5EhKVZdV8"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_060e5134","line":11,"in_reply_to":"3acd31a7_a31aef15","updated":"2015-04-30 02:38:10.000000000","message":"that\u0027s not the point. If you think that these tests you\u0027re pushing are really viable, there is no amount of words that I could possible spend to convince you otherwise.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":11,"context_line":"[2] https://www.youtube.com/watch?v\u003dXu5EhKVZdV8"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"},{"line_number":15,"context_line":"2) Hard to write"},{"line_number":16,"context_line":"3) Hard to maintain, as they test the inner workings of the"},{"line_number":17,"context_line":"   implementation, meaning that refactors requires changes to tests"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_b09fd35e","line":14,"updated":"2015-04-30 01:49:05.000000000","message":"functional tests and tests that make heavy use of inheritance aren\u0027t exactly piece of cake.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"},{"line_number":15,"context_line":"2) Hard to write"},{"line_number":16,"context_line":"3) Hard to maintain, as they test the inner workings of the"},{"line_number":17,"context_line":"   implementation, meaning that refactors requires changes to tests"},{"line_number":18,"context_line":"4) Don\u0027t test Neutron, but test some synthetic, modified version"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_909cd76a","line":15,"updated":"2015-04-30 01:49:05.000000000","message":"any good test is hard to write; that\u0027s why our job is not done by monkeys.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"},{"line_number":15,"context_line":"2) Hard to write"},{"line_number":16,"context_line":"3) Hard to maintain, as they test the inner workings of the"},{"line_number":17,"context_line":"   implementation, meaning that refactors requires changes to tests"},{"line_number":18,"context_line":"4) Don\u0027t test Neutron, but test some synthetic, modified version"},{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_b076b33c","line":16,"updated":"2015-04-30 01:49:05.000000000","message":"One might argue that\u0027s called white box testing.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"TL;DR: The existing unit tests for the DVR DB class are:"},{"line_number":14,"context_line":"1) Hard to follow"},{"line_number":15,"context_line":"2) Hard to write"},{"line_number":16,"context_line":"3) Hard to maintain, as they test the inner workings of the"},{"line_number":17,"context_line":"   implementation, meaning that refactors requires changes to tests"},{"line_number":18,"context_line":"4) Don\u0027t test Neutron, but test some synthetic, modified version"},{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_23b49ff0","line":16,"in_reply_to":"3acd31a7_b076b33c","updated":"2015-04-30 02:06:35.000000000","message":"The L3 agent functional tests are good example of white box testing. The current DVR DB unit tests  are not.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":15,"context_line":"2) Hard to write"},{"line_number":16,"context_line":"3) Hard to maintain, as they test the inner workings of the"},{"line_number":17,"context_line":"   implementation, meaning that refactors requires changes to tests"},{"line_number":18,"context_line":"4) Don\u0027t test Neutron, but test some synthetic, modified version"},{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"},{"line_number":20,"context_line":"   as the entire body of the method is mocked"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_9073b74d","line":18,"updated":"2015-04-30 01:49:05.000000000","message":"Unit tests test components. Neutron is a system of components.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"},{"line_number":20,"context_line":"   as the entire body of the method is mocked"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"* I realize that this is a meta-philosophical and existential"},{"line_number":23,"context_line":"  discussion and that many people will never change their minds"},{"line_number":24,"context_line":"  about the idea of testing code in isolation."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_90c17731","line":22,"updated":"2015-04-30 01:49:05.000000000","message":"There isn\u0027t much of metaphysical about unit testing.There is no one flavor of unit testing: a unit can be a single method or an entire class; one thing is certain though: if you start testing more than once class at once","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"},{"line_number":20,"context_line":"   as the entire body of the method is mocked"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"* I realize that this is a meta-philosophical and existential"},{"line_number":23,"context_line":"  discussion and that many people will never change their minds"},{"line_number":24,"context_line":"  about the idea of testing code in isolation."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_c3cbab71","line":22,"in_reply_to":"3acd31a7_43ee7b23","updated":"2015-04-30 02:06:35.000000000","message":"I agree.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"99098589698b5cbdd30f335efdb27f4ed3f3ed0e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   of Neutron code, and at times don\u0027t even test Neutron code at all"},{"line_number":20,"context_line":"   as the entire body of the method is mocked"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"* I realize that this is a meta-philosophical and existential"},{"line_number":23,"context_line":"  discussion and that many people will never change their minds"},{"line_number":24,"context_line":"  about the idea of testing code in isolation."},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3acd31a7_43ee7b23","line":22,"in_reply_to":"3acd31a7_90c17731","updated":"2015-04-30 01:51:21.000000000","message":"...that\u0027s not unit testing.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"}],"neutron/tests/functional/services/l3_router/test_l3_router_plugin.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ff08997a97a8e753721bd4f4d7673131ccde280d","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    def test_remove_router_interface_by_subnet_leaves_snat_intact(self):"},{"line_number":107,"context_line":"        self._test_remove_router_interface_leaves_snat_intact(by_subnet\u003dTrue)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_remove_router_interface_by_port_leaves_snat_intact(self):"},{"line_number":110,"context_line":"        # Uncomment when bug 1443524 is fixed"},{"line_number":111,"context_line":"        # self._test_remove_router_interface_leaves_snat_intact("},{"line_number":112,"context_line":"        #     by_subnet\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_1f00eb33","line":109,"updated":"2015-08-17 23:57:20.000000000","message":"using:\n\n  @testtools.skipTest(\"Skipped until bug ... is fixed\")\n  def test_remove_router_interface_by_port_leaves_snat_intact(self):\n    self._test_remove_router_interface_leaves_snat_intact(by_subnet\u003dFalse)\n\nhighlights that the test is skipped and why","commit_id":"4608165207845f74685651622a6bbb7c68008047"},{"author":{"_account_id":15769,"name":"Lynn Li","email":"lynn.li@hp.com","username":"lynnli"},"change_message_id":"430c7422bb87d5ed6a4ea7917a31f0434018d78e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    def test_remove_router_interface_by_subnet_leaves_snat_intact(self):"},{"line_number":107,"context_line":"        self._test_remove_router_interface_leaves_snat_intact(by_subnet\u003dTrue)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_remove_router_interface_by_port_leaves_snat_intact(self):"},{"line_number":110,"context_line":"        # Uncomment when bug 1443524 is fixed"},{"line_number":111,"context_line":"        # self._test_remove_router_interface_leaves_snat_intact("},{"line_number":112,"context_line":"        #     by_subnet\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_90c03e7e","line":109,"in_reply_to":"fa1b9901_1f00eb33","updated":"2015-08-18 18:17:42.000000000","message":"Bug 1443524 was fixed in the patch, https://review.openstack.org/#/c/173001/.  I will reactivate this test case in the next patch.","commit_id":"4608165207845f74685651622a6bbb7c68008047"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d5436ad3b9f8c593308a9b644a60629f058aa668","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                self.context, \u0027network_id\u0027, \u0027host\u0027, \u0027agent_id\u0027))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _test_remove_router_interface_leaves_snat_intact(self, by_subnet):"},{"line_number":65,"context_line":"        with self.subnet() as subnet1, self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as \\"},{"line_number":66,"context_line":"                subnet2:"},{"line_number":67,"context_line":"            kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":68,"context_line":"                      external_net.EXTERNAL: True}"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_1e42cd68","line":65,"updated":"2015-08-19 16:16:40.000000000","message":"nit:  I think most of these in the source put the \u0027\\\u0027 after each \u0027,\u0027.  I might be wrong but I\u0027d prefer that.","commit_id":"275c6f64aee9b017c5ed0ee13be5d807ada41806"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"87ad92bfefa98db5425c9dc11a247c38112faf4f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                self.context, \u0027network_id\u0027, \u0027host\u0027, \u0027agent_id\u0027))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _test_remove_router_interface_leaves_snat_intact(self, by_subnet):"},{"line_number":65,"context_line":"        with self.subnet() as subnet1, self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as \\"},{"line_number":66,"context_line":"                subnet2:"},{"line_number":67,"context_line":"            kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"},{"line_number":68,"context_line":"                      external_net.EXTERNAL: True}"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_ec7c01b7","line":65,"in_reply_to":"fa1b9901_1e42cd68","updated":"2015-08-19 22:00:27.000000000","message":"Done","commit_id":"275c6f64aee9b017c5ed0ee13be5d807ada41806"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b1bdabd96718f50be2c13f1b605296190c26e9f4","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        self.assertRaises(NotImplementedError,"},{"line_number":76,"context_line":"                          self.mixin._validate_router_migration,"},{"line_number":77,"context_line":"                          self.ctx, router_db, {\u0027distributed\u0027: False})"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_update_router_db_centralized_to_distributed(self):"},{"line_number":80,"context_line":"        router \u003d {\u0027name\u0027: \u0027foo_router\u0027, \u0027admin_state_up\u0027: True}"},{"line_number":81,"context_line":"        agent \u003d {\u0027id\u0027: _uuid()}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_0de2f403","side":"PARENT","line":78,"updated":"2015-04-30 00:34:24.000000000","message":"I moved just a random selection of existing mock-heavy unit tests to show how they\u0027d look without mocks. The other tests will have to be translated in a later patch.","commit_id":"350e2d1ee8a1e300d5ef182be152db77b65bd44c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                \u0027router\u0027, \u0027before_update\u0027, self.mixin, **kwargs)"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"class L3DvrMocklessTestCase(ml2_test_base.ML2TestFramework):"},{"line_number":480,"context_line":"    def setUp(self):"},{"line_number":481,"context_line":"        super(L3DvrMocklessTestCase, self).setUp()"},{"line_number":482,"context_line":"        self.l3_agent \u003d helpers.register_l3_agent("}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_300ce393","line":479,"updated":"2015-04-30 01:49:05.000000000","message":"You\u0027re bringing in a gigantic baggage of junk here, making the outcome of component interactions incredibly difficult to decipher.\n\nLet\u0027s stop pretending that just because the test method is trivial, all of a sudden writing/updating/troubleshooting tests is piece of cake, because it isn\u0027t.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":479,"context_line":"class L3DvrMocklessTestCase(ml2_test_base.ML2TestFramework):"},{"line_number":480,"context_line":"    def setUp(self):"},{"line_number":481,"context_line":"        super(L3DvrMocklessTestCase, self).setUp()"},{"line_number":482,"context_line":"        self.l3_agent \u003d helpers.register_l3_agent("},{"line_number":483,"context_line":"            agent_mode\u003dl3_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _create_router(self, distributed\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_f089cbcb","line":482,"updated":"2015-04-30 01:49:05.000000000","message":"I shouldn\u0027t need to load an L3 agent to test the DB logic behavior! That\u0027s nonsense.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e184f591eefebe06ffedd1af3d6a2fca9efeed62","unresolved":false,"context_lines":[{"line_number":479,"context_line":"class L3DvrMocklessTestCase(ml2_test_base.ML2TestFramework):"},{"line_number":480,"context_line":"    def setUp(self):"},{"line_number":481,"context_line":"        super(L3DvrMocklessTestCase, self).setUp()"},{"line_number":482,"context_line":"        self.l3_agent \u003d helpers.register_l3_agent("},{"line_number":483,"context_line":"            agent_mode\u003dl3_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _create_router(self, distributed\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_239fff04","line":482,"in_reply_to":"3acd31a7_63a177a9","updated":"2015-04-30 02:38:10.000000000","message":"it is indeed.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":479,"context_line":"class L3DvrMocklessTestCase(ml2_test_base.ML2TestFramework):"},{"line_number":480,"context_line":"    def setUp(self):"},{"line_number":481,"context_line":"        super(L3DvrMocklessTestCase, self).setUp()"},{"line_number":482,"context_line":"        self.l3_agent \u003d helpers.register_l3_agent("},{"line_number":483,"context_line":"            agent_mode\u003dl3_const.L3_AGENT_MODE_DVR_SNAT)"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def _create_router(self, distributed\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_63a177a9","line":482,"in_reply_to":"3acd31a7_f089cbcb","updated":"2015-04-30 02:06:35.000000000","message":"I\u0027m actually pretty sure that the tests pass if I comment out the l3 agent registration but that\u0027s besides the point.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def test_update_router_db_centralized_to_distributed(self):"},{"line_number":490,"context_line":"        router \u003d self._create_router(distributed\u003dFalse)"},{"line_number":491,"context_line":"        self.assertFalse(router[\u0027distributed\u0027])"},{"line_number":492,"context_line":"        self.l3_plugin.update_router("},{"line_number":493,"context_line":"            self.context, router[\u0027id\u0027], {\u0027router\u0027: {\u0027distributed\u0027: True}})"},{"line_number":494,"context_line":"        router \u003d self.l3_plugin.get_router(self.context, router[\u0027id\u0027])"},{"line_number":495,"context_line":"        self.assertTrue(router[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_10bb2774","line":492,"updated":"2015-04-30 01:49:05.000000000","message":"this may trigger RPC notifications, backend calls etc. This is incredibly error prone, and brittle.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def test_update_router_db_centralized_to_distributed(self):"},{"line_number":490,"context_line":"        router \u003d self._create_router(distributed\u003dFalse)"},{"line_number":491,"context_line":"        self.assertFalse(router[\u0027distributed\u0027])"},{"line_number":492,"context_line":"        self.l3_plugin.update_router("},{"line_number":493,"context_line":"            self.context, router[\u0027id\u0027], {\u0027router\u0027: {\u0027distributed\u0027: True}})"},{"line_number":494,"context_line":"        router \u003d self.l3_plugin.get_router(self.context, router[\u0027id\u0027])"},{"line_number":495,"context_line":"        self.assertTrue(router[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_a39f8f5e","line":492,"in_reply_to":"3acd31a7_10bb2774","updated":"2015-04-30 02:06:35.000000000","message":"We have a ton of tests with the same type of setup, I\u0027ve never seen them fail nondeterministicly. Am I missing something?","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e184f591eefebe06ffedd1af3d6a2fca9efeed62","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def test_update_router_db_centralized_to_distributed(self):"},{"line_number":490,"context_line":"        router \u003d self._create_router(distributed\u003dFalse)"},{"line_number":491,"context_line":"        self.assertFalse(router[\u0027distributed\u0027])"},{"line_number":492,"context_line":"        self.l3_plugin.update_router("},{"line_number":493,"context_line":"            self.context, router[\u0027id\u0027], {\u0027router\u0027: {\u0027distributed\u0027: True}})"},{"line_number":494,"context_line":"        router \u003d self.l3_plugin.get_router(self.context, router[\u0027id\u0027])"},{"line_number":495,"context_line":"        self.assertTrue(router[\u0027distributed\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_439afb15","line":492,"in_reply_to":"3acd31a7_a39f8f5e","updated":"2015-04-30 02:38:10.000000000","message":"I never mention non determinism; what I mean is that due to the nature of the code you\u0027re testing, this might lead to unexpected behavior or side effects (for instance a system call that you never intended to exercise?)","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            self.l3_plugin._get_agent_gw_ports_exist_for_network("},{"line_number":538,"context_line":"                self.context, network_id, None, agent_id)[\u0027id\u0027])"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    def _test_remove_router_interface_leaves_snat_intact(self, by_subnet):"},{"line_number":541,"context_line":"        with self.subnet() as subnet1, self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as \\"},{"line_number":542,"context_line":"                subnet2:"},{"line_number":543,"context_line":"            kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_501d1f72","line":540,"updated":"2015-04-30 01:49:05.000000000","message":"So I sense that you think that pulling the entire Neutron server (API, policy, scheduling, quota checking, RPC, ...) is the right thing to do to? So how is writing/maintaining/updating tests going to be any easier if a change in the policy layer makes this test fail inexplicably?\n\nThese tests were supposed to validate the DB layer logic and the db logic alone. This test case clearly doesn\u0027t belong here. If the intention is to check that the object does not disappear from the DB that\u0027s what we should validate. I suspect that this requires an overhaul of the code being tested, overhauling the tests themselves is solving the wrong problem.\n\nIn other words, if tests are convoluted, the most likely culprit is the code being tested. Stop demonising mocks, because they ain\u0027t the problem. The problem is that the code is not written with maintainability and testability in mind.\n\nl3_dvr_db.py (as l3_db.py, etc in Neutron) is not about DB management alone, that\u0027s the problem. If they were these tests would be indeed trivial.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a2a91569c6fd8c4c67273034a9954a835af6913e","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            self.l3_plugin._get_agent_gw_ports_exist_for_network("},{"line_number":538,"context_line":"                self.context, network_id, None, agent_id)[\u0027id\u0027])"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    def _test_remove_router_interface_leaves_snat_intact(self, by_subnet):"},{"line_number":541,"context_line":"        with self.subnet() as subnet1, self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as \\"},{"line_number":542,"context_line":"                subnet2:"},{"line_number":543,"context_line":"            kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_e37c6722","line":540,"in_reply_to":"3acd31a7_501d1f72","updated":"2015-04-30 02:06:35.000000000","message":"This is obviously very subjective, but if this test fails I don\u0027t think it\u0027s that difficult to figure out what went wrong (I\u0027m arguing that this isn\u0027t *that* of a high level test). The method under test is used directly by remove_router_interface. In fact this test targets the interaction between remove_router_interface and delete_csnat_router_interface_ports.\n\nWith that being said, if you drill down the setUp of this test (And its class), it\u0027s indeed monstrous.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e184f591eefebe06ffedd1af3d6a2fca9efeed62","unresolved":false,"context_lines":[{"line_number":537,"context_line":"            self.l3_plugin._get_agent_gw_ports_exist_for_network("},{"line_number":538,"context_line":"                self.context, network_id, None, agent_id)[\u0027id\u0027])"},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"    def _test_remove_router_interface_leaves_snat_intact(self, by_subnet):"},{"line_number":541,"context_line":"        with self.subnet() as subnet1, self.subnet(cidr\u003d\u002720.0.0.0/24\u0027) as \\"},{"line_number":542,"context_line":"                subnet2:"},{"line_number":543,"context_line":"            kwargs \u003d {\u0027arg_list\u0027: (external_net.EXTERNAL,),"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_c6105951","line":540,"in_reply_to":"3acd31a7_e37c6722","updated":"2015-04-30 02:38:10.000000000","message":"and that\u0027s a good thing? You seem to be in contradiction with yourself.","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b1bdabd96718f50be2c13f1b605296190c26e9f4","unresolved":false,"context_lines":[{"line_number":577,"context_line":"                self.assertEqual("},{"line_number":578,"context_line":"                    1, len(self.l3_plugin._get_snat_sync_interfaces("},{"line_number":579,"context_line":"                        self.context, [router[\u0027id\u0027]])))"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def test_remove_router_interface_by_subnet_leaves_snat_intact(self):"},{"line_number":582,"context_line":"        self._test_remove_router_interface_leaves_snat_intact(by_subnet\u003dTrue)"},{"line_number":583,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_cdcbdc71","line":580,"updated":"2015-04-30 00:34:24.000000000","message":"This test is new, and the next one is used (Uncommented) by the next patch in the series, which is the bug fix that this entire series is about...","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"}],"neutron/tests/unit/plugins/ml2/base.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"fecdedcc28bc7dcb24c2deb759e2a5acf2250503","unresolved":false,"context_lines":[{"line_number":19,"context_line":"HOST \u003d \u0027localhost\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class ML2TestFramework(test_plugin.Ml2PluginV2TestCase):"},{"line_number":23,"context_line":"    l3_plugin \u003d (\u0027neutron.services.l3_router.l3_router_plugin.\u0027"},{"line_number":24,"context_line":"                 \u0027L3RouterPlugin\u0027)"},{"line_number":25,"context_line":"    _mechanism_drivers \u003d [\u0027openvswitch\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3acd31a7_63ff3702","line":22,"updated":"2015-04-30 01:49:05.000000000","message":"/me pukes","commit_id":"4aa5cd26b5c66034fa78af1199ba65ce7cf4c320"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d8442555a53cab93f80d68fe48fe953ca599d2dc","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":17,"context_line":"from neutron.tests.unit.plugins.ml2 import test_plugin"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"HOST \u003d \u0027localhost\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class ML2TestFramework(test_plugin.Ml2PluginV2TestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_6ce0f1fa","line":19,"updated":"2015-08-19 21:36:41.000000000","message":"unused?  Has flake8 flaked-out?","commit_id":"275c6f64aee9b017c5ed0ee13be5d807ada41806"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"87ad92bfefa98db5425c9dc11a247c38112faf4f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":17,"context_line":"from neutron.tests.unit.plugins.ml2 import test_plugin"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"HOST \u003d \u0027localhost\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class ML2TestFramework(test_plugin.Ml2PluginV2TestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_0c8cd5d8","line":19,"in_reply_to":"fa1b9901_6ce0f1fa","updated":"2015-08-19 22:00:27.000000000","message":"Done","commit_id":"275c6f64aee9b017c5ed0ee13be5d807ada41806"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"81ecb425739324f8a17a14a097cac01458c50dc2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":17,"context_line":"from neutron.tests.unit.plugins.ml2 import test_plugin"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"HOST \u003d \u0027localhost\u0027"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class ML2TestFramework(test_plugin.Ml2PluginV2TestCase):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_a7d7024a","line":19,"in_reply_to":"fa1b9901_6ce0f1fa","updated":"2015-08-19 21:59:34.000000000","message":"code checkers are able to detect unused variables in functions/methods but not unused variables at module level","commit_id":"275c6f64aee9b017c5ed0ee13be5d807ada41806"}]}
