)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"12142705bffc62fc2fbd92a7020dc3caced79689","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are various places where a patcher was started but never stopped"},{"line_number":10,"context_line":"or the test stopped the wrong thing. This causes that the mocking is not"},{"line_number":11,"context_line":"removed at the end of the test case leads to interfering tests."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I8e66154c19c125f3093c8a1990b0c79332996560"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_919f6e01","line":11,"range":{"start_line":11,"start_character":45,"end_line":11,"end_character":56},"updated":"2018-09-12 23:08:13.000000000","message":"Just curious, what do you mean by \"interfering\"? Does it cause intermittent test failures or something like that?","commit_id":"ffbc1eab36e2a3712523090651994cd968eb5041"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"27afa9cb1d27b7b993a375bc8379fdd30f015733","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There are various places where a patcher was started but never stopped"},{"line_number":10,"context_line":"or the test stopped the wrong thing. This causes that the mocking is not"},{"line_number":11,"context_line":"removed at the end of the test case leads to interfering tests."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I8e66154c19c125f3093c8a1990b0c79332996560"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_c611abb1","line":11,"range":{"start_line":11,"start_character":45,"end_line":11,"end_character":56},"in_reply_to":"3f79a3b5_919f6e01","updated":"2018-09-13 02:55:16.000000000","message":"Yes. Depending on the test case execution order it can cause that subsequent test cases fail intermittently.","commit_id":"ffbc1eab36e2a3712523090651994cd968eb5041"}],"nova/tests/unit/pci/fakes.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"94cc9d647565fecdd948b4dbd204d2832ca10d7c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def wrapper(self, *args, **kwargs):"},{"line_number":35,"context_line":"        patcher \u003d fake_pci_whitelist()"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            f(self, *args, **kwargs)"},{"line_number":38,"context_line":"        finally:"},{"line_number":39,"context_line":"            patcher.stop()"},{"line_number":40,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e2528868","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":36},"updated":"2018-09-13 15:27:44.000000000","message":"I guess nobody uses the return value from this","commit_id":"63dcd4bd90c75b14605267fd272704b81832dd74"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0acc419c161e8c712b684de4dce1698b294a26b4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            f(self, *args, **kwargs)"},{"line_number":38,"context_line":"        finally:"},{"line_number":39,"context_line":"            patcher.stop()"},{"line_number":40,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_223e408b","line":39,"updated":"2018-09-13 15:05:27.000000000","message":"Nice catch.","commit_id":"63dcd4bd90c75b14605267fd272704b81832dd74"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"94cc9d647565fecdd948b4dbd204d2832ca10d7c","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        super(TestSetAndClearAllocations, self).setUp()"},{"line_number":1059,"context_line":"        # We want to reuse the mock throughout the class, but with"},{"line_number":1060,"context_line":"        # different return values."},{"line_number":1061,"context_line":"        patcher \u003d mock.patch("},{"line_number":1062,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.post\u0027)"},{"line_number":1063,"context_line":"        self.mock_post \u003d patcher.start()"},{"line_number":1064,"context_line":"        self.addCleanup(patcher.stop)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_426d7c01","line":1061,"updated":"2018-09-13 15:27:44.000000000","message":"I feel obligated to mention that the testtools and fixtures modules have convenience mechanisms to do this kind of thing in one \"line\", e.g.:\n\n self.mock_post \u003d self.useFixture(fixtures.MockPatch(\n     \u0027nova.scheduler.client.report.SchedulerReportClient.post\u0027)).mock\n\nfixtures.MockPatch (and its brethren) supply the starting and stopping, and testtools.useFixture invokes the starter and adds the stopper to the cleanup stack.\n\nNo, it\u0027s not really less in terms of char count, but it makes it less likely to forget to add (or misspell, as in this case) the cleanup.","commit_id":"63dcd4bd90c75b14605267fd272704b81832dd74"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f45a68f1ac59abfaed6c7e0dcca5f06441e688c9","unresolved":false,"context_lines":[{"line_number":1058,"context_line":"        super(TestSetAndClearAllocations, self).setUp()"},{"line_number":1059,"context_line":"        # We want to reuse the mock throughout the class, but with"},{"line_number":1060,"context_line":"        # different return values."},{"line_number":1061,"context_line":"        patcher \u003d mock.patch("},{"line_number":1062,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.post\u0027)"},{"line_number":1063,"context_line":"        self.mock_post \u003d patcher.start()"},{"line_number":1064,"context_line":"        self.addCleanup(patcher.stop)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_43833ecc","line":1061,"in_reply_to":"3f79a3b5_426d7c01","updated":"2018-09-13 16:56:37.000000000","message":"Good point. I try to remember it next time I have to write a mock in setUP.","commit_id":"63dcd4bd90c75b14605267fd272704b81832dd74"}]}
