)]}'
{"neutron/common/rpc.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"d01967df165a44a2481be0b01859e078036e9bb0","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def close(self):"},{"line_number":205,"context_line":"        for server in self.servers:"},{"line_number":206,"context_line":"            server.stop()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"# functions"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_38cd325e","line":206,"updated":"2015-01-23 16:25:10.000000000","message":"For a clean shutdown, I think server.wait() is needed as well, or do you think there\u0027s a good reason to skip it?","commit_id":"d2cbca700ae7fbe65ed0946de52e7f71e816b980"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"3c0dce54665b44b954247db058840b777f5f48ab","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def close(self):"},{"line_number":205,"context_line":"        for server in self.servers:"},{"line_number":206,"context_line":"            server.stop()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"# functions"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_38d7f2c0","line":206,"in_reply_to":"1a930d6b_38cd325e","updated":"2015-01-23 16:28:06.000000000","message":"I\u0027d call stop() on all of them first before going back and calling wait()","commit_id":"d2cbca700ae7fbe65ed0946de52e7f71e816b980"},{"author":{"_account_id":5950,"name":"Ilya Shakhat","email":"shakhat@gmail.com","username":"shakhat"},"change_message_id":"d8652e11419a7be3365201c14e4a4cc8b1d74439","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def close(self):"},{"line_number":205,"context_line":"        for server in self.servers:"},{"line_number":206,"context_line":"            server.stop()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"# functions"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_e11749ec","line":206,"in_reply_to":"1a930d6b_38d7f2c0","updated":"2015-01-26 14:01:38.000000000","message":"Russell, I\u0027ve added a call to server.wait() here. But it appears that more correct would be to add method rpc.Service.wait() that calls a method in connection with server.wait().","commit_id":"d2cbca700ae7fbe65ed0946de52e7f71e816b980"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64a1af9f61e176a8c1257b2c3dc86e7abd23c655","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    def close(self):"},{"line_number":199,"context_line":"        for server in self.servers:"},{"line_number":200,"context_line":"            server.stop()"},{"line_number":201,"context_line":"            server.wait()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"# functions"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_817045dd","line":201,"updated":"2015-01-26 14:14:16.000000000","message":"You are better first stop() all servers, then wait for them, with two separate loops. In that way, you will be able to stop servers in parallel.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"},{"author":{"_account_id":5950,"name":"Ilya Shakhat","email":"shakhat@gmail.com","username":"shakhat"},"change_message_id":"4080aed1ed9684ef41d3114ed34735a40b71e723","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    def close(self):"},{"line_number":199,"context_line":"        for server in self.servers:"},{"line_number":200,"context_line":"            server.stop()"},{"line_number":201,"context_line":"            server.wait()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"# functions"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_5ce480e0","line":201,"in_reply_to":"1a930d6b_817045dd","updated":"2015-01-26 14:22:55.000000000","message":"Ok. BTW, is it better to add wait() method to Service class too? It is called from openstack.common.service.Services.stop() #463.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"}],"neutron/tests/unit/test_rpc_service.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64a1af9f61e176a8c1257b2c3dc86e7abd23c655","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF.import_opt(\u0027state_path\u0027, \u0027neutron.common.config\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class ServiceTestCase(testtools.TestCase):"},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(ServiceTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.host \u003d \u0027foo\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_a15f0140","line":28,"updated":"2015-01-26 14:14:16.000000000","message":"You should inherit from neutron.tests.base.BaseTestCase.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"},{"author":{"_account_id":5950,"name":"Ilya Shakhat","email":"shakhat@gmail.com","username":"shakhat"},"change_message_id":"4080aed1ed9684ef41d3114ed34735a40b71e723","unresolved":false,"context_lines":[{"line_number":25,"context_line":"CONF.import_opt(\u0027state_path\u0027, \u0027neutron.common.config\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class ServiceTestCase(testtools.TestCase):"},{"line_number":29,"context_line":"    def setUp(self):"},{"line_number":30,"context_line":"        super(ServiceTestCase, self).setUp()"},{"line_number":31,"context_line":"        self.host \u003d \u0027foo\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_fc17eceb","line":28,"in_reply_to":"1a930d6b_a15f0140","updated":"2015-01-26 14:22:55.000000000","message":"BaseTestCase mocks neutron.common.rpc.Connection.consume_in_threads which needs to be preserved to run server.start() method. As a solution I can base test case on SubBaseTestCase.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64a1af9f61e176a8c1257b2c3dc86e7abd23c655","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.target_mock \u003d mock.patch(\u0027oslo.messaging.Target\u0027)"},{"line_number":35,"context_line":"        self.target_mock.start()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        self.messaging_conf \u003d messaging_conffixture.ConfFixture(CONF)"},{"line_number":38,"context_line":"        self.messaging_conf.transport_driver \u003d \u0027fake\u0027"},{"line_number":39,"context_line":"        self.messaging_conf.response_timeout \u003d 0"},{"line_number":40,"context_line":"        self.useFixture(self.messaging_conf)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_5c5480fe","line":37,"updated":"2015-01-26 14:14:16.000000000","message":"You won\u0027t need all of these setup steps if you inherit from proper class.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"64a1af9f61e176a8c1257b2c3dc86e7abd23c655","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.addCleanup(rpc.cleanup)"},{"line_number":46,"context_line":"        rpc.init(CONF)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def tearDown(self):"},{"line_number":49,"context_line":"        super(ServiceTestCase, self).tearDown()"},{"line_number":50,"context_line":"        self.target_mock.stop()"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_7c6cdcd0","line":48,"updated":"2015-01-26 14:14:16.000000000","message":"mock.patch.stopall is added as a cleanup by BaseTestCase, no need for this method.","commit_id":"d339d3c32a973a64c0e2f905b6dbc80ecabc6430"}]}
