)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"4154e8ec1842e9ca0929b2fd7c1ef937955540de","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When JournalPeriodicProccesor gets a HUP it will now call a forced run"},{"line_number":10,"context_line":"of the maintenance task. This can be useful to do a full sync on demand,"},{"line_number":11,"context_line":"like in a deployment of ODL."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I0936a63b07982d8cb19687a63a0dc47684887002"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"df87a7cf_95aa0bd0","line":11,"updated":"2017-12-14 08:25:34.000000000","message":"nit: upgrade","commit_id":"78a9b2b171c7373fb994b01542cc819e569dbdd4"}],"networking_odl/journal/worker.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"78ffeb1d5810a83e7bde05284286d3f608cee8e8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    entries in the aforementioned run didn\u0027t process correctly due to some"},{"line_number":41,"context_line":"    error (usually a connection problem) and need to be retried."},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    _timer \u003d None"},{"line_number":44,"context_line":"    _periodic_task \u003d None"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def __init__(self):"},{"line_number":47,"context_line":"        super(JournalPeriodicProcessor, self).__init__()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_57965e95","line":44,"range":{"start_line":43,"start_character":0,"end_line":44,"end_character":25},"updated":"2017-10-23 19:02:08.000000000","message":"Why do they need to be class attributes?","commit_id":"64129dd5f02547324e200729b2f531f9caf33294"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"7fa8cf7e43161b6c3e1a3ecdcb857c5d3eb17bc4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    entries in the aforementioned run didn\u0027t process correctly due to some"},{"line_number":41,"context_line":"    error (usually a connection problem) and need to be retried."},{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":"    _timer \u003d None"},{"line_number":44,"context_line":"    _periodic_task \u003d None"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def __init__(self):"},{"line_number":47,"context_line":"        super(JournalPeriodicProcessor, self).__init__()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_7fe9fdb4","line":44,"range":{"start_line":43,"start_character":0,"end_line":44,"end_character":25},"in_reply_to":"3f4b6375_57965e95","updated":"2017-10-25 11:28:22.000000000","message":"They don\u0027t and it actually makes sense they are not. Done.","commit_id":"64129dd5f02547324e200729b2f531f9caf33294"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"78ffeb1d5810a83e7bde05284286d3f608cee8e8","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def reset(self):"},{"line_number":69,"context_line":"        if self._periodic_task:"},{"line_number":70,"context_line":"            self._periodic_task.execute_ops(forced\u003dTrue)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _call_journal(self):"},{"line_number":73,"context_line":"        self._journal.set_sync_event()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_b73eb288","line":70,"range":{"start_line":69,"start_character":0,"end_line":70,"end_character":56},"updated":"2017-10-23 19:02:08.000000000","message":"This worries me. What\u0027s the purpose of this?\n\nCan\u0027t we wait for the (potential) current execution to complete and start over execution immediately?\nThis would open subtle issues because periodic task is assuming exclusion with OpenDaylightPeriodicTask.\n\n\nIf we\u0027d like to start full sync with minimum wait, we can introduce dedicated periodic task for full sync. also in order to avoid competing thread, dedicated worker can also be introduced.","commit_id":"64129dd5f02547324e200729b2f531f9caf33294"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"7fa8cf7e43161b6c3e1a3ecdcb857c5d3eb17bc4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def reset(self):"},{"line_number":69,"context_line":"        if self._periodic_task:"},{"line_number":70,"context_line":"            self._periodic_task.execute_ops(forced\u003dTrue)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _call_journal(self):"},{"line_number":73,"context_line":"        self._journal.set_sync_event()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_bf7f75de","line":70,"range":{"start_line":69,"start_character":0,"end_line":70,"end_character":56},"in_reply_to":"3f4b6375_b73eb288","updated":"2017-10-25 11:28:22.000000000","message":"Have you seen the patch that introduces the forced execution? It only bypasses the back-to-back check, it does not avoid the lock. \n\nUnless I misunderstood you.","commit_id":"64129dd5f02547324e200729b2f531f9caf33294"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6919feee668568eab33d19de7d3f06267e07d484","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        pass"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def reset(self):"},{"line_number":68,"context_line":"        if self._periodic_task:"},{"line_number":69,"context_line":"            self._periodic_task.execute_ops(forced\u003dTrue)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _call_journal(self):"},{"line_number":72,"context_line":"        self._journal.set_sync_event()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_81d8f452","line":69,"range":{"start_line":68,"start_character":0,"end_line":69,"end_character":56},"updated":"2017-11-03 01:29:08.000000000","message":"Does it make sense to call execute_ops(forced\u003dTrue) on every start()?\ni.e. neutron start up and sighup.\nJust a question. I don\u0027t have strong preference either way.","commit_id":"20e5b9ff175a430dfb0bd4117533853b25b0eadc"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"6ec4f8c2f3413ab2bfaf4d620d7bd0ff767dfd7c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        pass"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def reset(self):"},{"line_number":68,"context_line":"        if self._periodic_task:"},{"line_number":69,"context_line":"            self._periodic_task.execute_ops(forced\u003dTrue)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _call_journal(self):"},{"line_number":72,"context_line":"        self._journal.set_sync_event()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_22d88d51","line":69,"range":{"start_line":68,"start_character":0,"end_line":69,"end_character":56},"in_reply_to":"3f4b6375_81d8f452","updated":"2017-11-13 09:28:30.000000000","message":"This is on `reset` not `start`. And yes, it does, as it is the point of the patch.","commit_id":"20e5b9ff175a430dfb0bd4117533853b25b0eadc"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"24dd1a48ae597f2a8cbafab3fecc9bc9c4127c9d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        pass"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def reset(self):"},{"line_number":81,"context_line":"        if self._maintenance_task:"},{"line_number":82,"context_line":"            self._maintenance_task.execute_ops(forced\u003dTrue)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _call_journal(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"df87a7cf_da781b91","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":34},"updated":"2017-12-11 09:09:34.000000000","message":"if self._maintenance_task is not None:","commit_id":"224b532518fdcd0562880ad0002172ae1badf700"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a68a30344095f7260388a7f98fae55e629af51bd","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        pass"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def reset(self):"},{"line_number":81,"context_line":"        if self._maintenance_task:"},{"line_number":82,"context_line":"            self._maintenance_task.execute_ops(forced\u003dTrue)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _call_journal(self):"}],"source_content_type":"text/x-python","patch_set":27,"id":"df87a7cf_bd299137","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":34},"in_reply_to":"df87a7cf_da781b91","updated":"2017-12-11 12:03:41.000000000","message":"Done","commit_id":"224b532518fdcd0562880ad0002172ae1badf700"}],"networking_odl/tests/unit/journal/test_journal.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from networking_odl.tests.unit.db import test_db"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"proccess_running_statuses \u003d [\u0027S\u0027, \u0027R\u0027, \u0027D\u0027]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_64bc40bb","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":25},"updated":"2017-12-06 08:03:17.000000000","message":"Should this be all CAPS?","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from networking_odl.tests.unit.db import test_db"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"proccess_running_statuses \u003d [\u0027S\u0027, \u0027R\u0027, \u0027D\u0027]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_e4c7f044","line":45,"range":{"start_line":45,"start_character":28,"end_line":45,"end_character":43},"updated":"2017-12-06 08:03:17.000000000","message":"nit: could be a tuple","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from networking_odl.tests.unit.db import test_db"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"proccess_running_statuses \u003d [\u0027S\u0027, \u0027R\u0027, \u0027D\u0027]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_926ccace","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":25},"in_reply_to":"df87a7cf_64bc40bb","updated":"2017-12-09 21:07:32.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from networking_odl.tests.unit.db import test_db"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"proccess_running_statuses \u003d [\u0027S\u0027, \u0027R\u0027, \u0027D\u0027]"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_f27196a9","line":45,"range":{"start_line":45,"start_character":28,"end_line":45,"end_character":43},"in_reply_to":"df87a7cf_e4c7f044","updated":"2017-12-09 21:07:32.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":71,"context_line":"    def test_processing(self, mock_journal):"},{"line_number":72,"context_line":"        self.cfg.config(sync_timeout\u003d0.1, group\u003d\u0027ml2_odl\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":75,"context_line":"        self.addCleanup(periodic_processor.stop)"},{"line_number":76,"context_line":"        periodic_processor.start()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_a49a486b","line":73,"range":{"start_line":73,"start_character":0,"end_line":73,"end_character":0},"updated":"2017-12-06 08:03:17.000000000","message":"nit: unnecessary change","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":71,"context_line":"    def test_processing(self, mock_journal):"},{"line_number":72,"context_line":"        self.cfg.config(sync_timeout\u003d0.1, group\u003d\u0027ml2_odl\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":75,"context_line":"        self.addCleanup(periodic_processor.stop)"},{"line_number":76,"context_line":"        periodic_processor.start()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_e232565e","line":73,"range":{"start_line":73,"start_character":0,"end_line":73,"end_character":0},"in_reply_to":"df87a7cf_a49a486b","updated":"2017-12-09 21:07:32.000000000","message":"probably introduced by accident when merging patches","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                       \u0027_start_maintenance_task\u0027)"},{"line_number":106,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":107,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":108,"context_line":"    def test_handle_sighup_gracefully(self, mock_journal, mock_maintenance):"},{"line_number":109,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":110,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_249dd858","line":108,"range":{"start_line":108,"start_character":58,"end_line":108,"end_character":74},"updated":"2017-12-06 08:03:17.000000000","message":"Unused parameter","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                       \u0027_start_maintenance_task\u0027)"},{"line_number":106,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":107,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":108,"context_line":"    def test_handle_sighup_gracefully(self, mock_journal, mock_maintenance):"},{"line_number":109,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":110,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_82434aaf","line":108,"range":{"start_line":108,"start_character":58,"end_line":108,"end_character":74},"in_reply_to":"df87a7cf_249dd858","updated":"2017-12-09 21:07:32.000000000","message":"correct, it\u0027s only there to create the mock so it becomes a NOOP operation, nothing else.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"24dd1a48ae597f2a8cbafab3fecc9bc9c4127c9d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                       \u0027_start_maintenance_task\u0027)"},{"line_number":106,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":107,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":108,"context_line":"    def test_handle_sighup_gracefully(self, mock_journal, mock_maintenance):"},{"line_number":109,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":110,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_9acff327","line":108,"range":{"start_line":108,"start_character":58,"end_line":108,"end_character":74},"in_reply_to":"df87a7cf_82434aaf","updated":"2017-12-11 09:09:34.000000000","message":"In such a case you should use new\u003dmock.Mock() in the decorator","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a68a30344095f7260388a7f98fae55e629af51bd","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                       \u0027_start_maintenance_task\u0027)"},{"line_number":106,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":107,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":108,"context_line":"    def test_handle_sighup_gracefully(self, mock_journal, mock_maintenance):"},{"line_number":109,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":110,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_3dea61d7","line":108,"range":{"start_line":108,"start_character":58,"end_line":108,"end_character":74},"in_reply_to":"df87a7cf_9acff327","updated":"2017-12-11 12:03:41.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def test_maintenance_task(self, *stack_order):"},{"line_number":132,"context_line":"        self.periodic_task_fixture.task_start_mock.stop()"},{"line_number":133,"context_line":"        self.addCleanup(self.periodic_task_fixture.task_start_mock.start)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        mock_baseline \u003d mock.Mock()"},{"line_number":136,"context_line":"        mock_db_module \u003d mock.MagicMock(spec\u003ddb)"},{"line_number":137,"context_line":"        mock_db_module.was_periodic_task_executed_recently.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_44901c44","line":134,"updated":"2017-12-06 08:03:17.000000000","message":"nit: unnecessary change","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_84f4e487","line":192,"range":{"start_line":192,"start_character":36,"end_line":192,"end_character":48},"updated":"2017-12-06 08:03:17.000000000","message":"unused parameter","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_c4faec73","line":192,"range":{"start_line":192,"start_character":50,"end_line":192,"end_character":66},"updated":"2017-12-06 08:03:17.000000000","message":"unused parameter","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_02709adb","line":192,"range":{"start_line":192,"start_character":36,"end_line":192,"end_character":48},"in_reply_to":"df87a7cf_84f4e487","updated":"2017-12-09 21:07:32.000000000","message":"correct, it\u0027s only there to create the mock so it becomes a NOOP operation, nothing else.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"24dd1a48ae597f2a8cbafab3fecc9bc9c4127c9d","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_faa63fc1","line":192,"range":{"start_line":192,"start_character":50,"end_line":192,"end_character":66},"in_reply_to":"df87a7cf_a278cec3","updated":"2017-12-11 09:09:34.000000000","message":"Same here","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_a278cec3","line":192,"range":{"start_line":192,"start_character":50,"end_line":192,"end_character":66},"in_reply_to":"df87a7cf_c4faec73","updated":"2017-12-09 21:07:32.000000000","message":"correct, it\u0027s only there to create the mock so it becomes a NOOP operation, nothing else.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a68a30344095f7260388a7f98fae55e629af51bd","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":190,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":191,"context_line":"    def test_reset_called_on_sighup(self, mock_journal,"},{"line_number":192,"context_line":"                                    mock_pending, mock_maintenance):"},{"line_number":193,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_1dd99d20","line":192,"range":{"start_line":192,"start_character":50,"end_line":192,"end_character":66},"in_reply_to":"df87a7cf_faa63fc1","updated":"2017-12-11 12:03:41.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        c2p_read, c2p_write \u003d os.pipe()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        def was_called(*args, **kwargs):"},{"line_number":200,"context_line":"            with io.open(c2p_write, \u0027wb\u0027, 0) as f:"},{"line_number":201,"context_line":"                f.write(b\u00271\u0027)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        mock_journal.side_effect \u003d was_called"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_04b9b478","line":201,"range":{"start_line":197,"start_character":8,"end_line":201,"end_character":29},"updated":"2017-12-06 08:03:17.000000000","message":"Can you please document why this is necessary?\nI know why, but it\u0027s not really clear from just reading this test.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        c2p_read, c2p_write \u003d os.pipe()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        def was_called(*args, **kwargs):"},{"line_number":200,"context_line":"            with io.open(c2p_write, \u0027wb\u0027, 0) as f:"},{"line_number":201,"context_line":"                f.write(b\u00271\u0027)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        mock_journal.side_effect \u003d was_called"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_023e5ad9","line":201,"range":{"start_line":197,"start_character":8,"end_line":201,"end_character":29},"in_reply_to":"df87a7cf_04b9b478","updated":"2017-12-09 21:07:32.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            service_maker\u003dlambda: worker.JournalPeriodicProcessor())"},{"line_number":207,"context_line":"        self.addCleanup(self._kill_process, pid)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":210,"context_line":"        self.assertIn(state, proccess_running_statuses)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_e45b7051","line":210,"range":{"start_line":209,"start_character":8,"end_line":210,"end_character":55},"updated":"2017-12-06 08:03:17.000000000","message":"I\u0027d also check it after the SIGHUP to make sure the child process didn\u0027t die from the HUP.\n\nAlso this repeats in test_handle_sighup_gracefully, perhaps you can simply extract this to a utility method in this test class?","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a68a30344095f7260388a7f98fae55e629af51bd","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            service_maker\u003dlambda: worker.JournalPeriodicProcessor())"},{"line_number":207,"context_line":"        self.addCleanup(self._kill_process, pid)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":210,"context_line":"        self.assertIn(state, proccess_running_statuses)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_803ea2b5","line":210,"range":{"start_line":209,"start_character":8,"end_line":210,"end_character":55},"in_reply_to":"df87a7cf_3a010707","updated":"2017-12-11 12:03:41.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"24dd1a48ae597f2a8cbafab3fecc9bc9c4127c9d","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            service_maker\u003dlambda: worker.JournalPeriodicProcessor())"},{"line_number":207,"context_line":"        self.addCleanup(self._kill_process, pid)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":210,"context_line":"        self.assertIn(state, proccess_running_statuses)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_3a010707","line":210,"range":{"start_line":209,"start_character":8,"end_line":210,"end_character":55},"in_reply_to":"df87a7cf_c5ce3c81","updated":"2017-12-11 09:09:34.000000000","message":"In this case I believe this would make the code simpler:\n\n    def assert_process_running(pid):\n        cmd, state \u003d self._get_pid_status(pid)\n        self.assertIn(state, proccess_running_statuses)\n        return cmd\n\nI don\u0027t agree that in test code there\u0027s no need to reduce repetition, I think if you can make the code simpler you should.\n\nThat\u0027s why, for example, the standard library for tests has assertIn(first, second) while obviously you could just write assertTrue(first in second)\n\nAs a bonus, to make tests easier to debug you can specify a clearer failure message here like:\n\"Process %s is not running, state %s is not in expected states %s\" % (pid, state, proccess_running_statuses)","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            service_maker\u003dlambda: worker.JournalPeriodicProcessor())"},{"line_number":207,"context_line":"        self.addCleanup(self._kill_process, pid)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":210,"context_line":"        self.assertIn(state, proccess_running_statuses)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":213,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_c5ce3c81","line":210,"range":{"start_line":209,"start_character":8,"end_line":210,"end_character":55},"in_reply_to":"df87a7cf_e45b7051","updated":"2017-12-09 21:07:32.000000000","message":"\u003e I\u0027d also check it after the SIGHUP to make sure the child process didn\u0027t die from the HUP.\n\nThat\u0027s tested on test_handle_sighup_gracefully\n\n\u003e Also this repeats in test_handle_sighup_gracefully, perhaps you can simply extract this to a utility method in this test class?\n\nI am of the opinion that a test has to be as explicit as possible. Following this reasoning, I rather have the assert here than in a helper function as I can see more clearly when and where it failed. IMHO code repetition is less of an issue when it\u0027s on tests than when it is on the application.\n\nAlso, in this case it wouldn\u0027t provide much of an advantage since the could would also need to return a tuple with the cmd and the state as in the test that you mention I\u0027m testing in addition that the cmd of before and after are the same.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"dad75e543a1b2117e8dcc813f488a6e0e42cc322","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            periodic_processor.reset()"},{"line_number":225,"context_line":"        except AttributeError as e:"},{"line_number":226,"context_line":"            self.fail(e)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        periodic_processor._start_maintenance_task()"},{"line_number":229,"context_line":"        periodic_processor.reset()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_643520f7","line":226,"range":{"start_line":225,"start_character":8,"end_line":226,"end_character":24},"updated":"2017-12-06 08:03:17.000000000","message":"Why is this necessary?","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"fc84d9ca8ec26b332c951c593114b4cf10ab4dd6","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            periodic_processor.reset()"},{"line_number":225,"context_line":"        except AttributeError as e:"},{"line_number":226,"context_line":"            self.fail(e)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        periodic_processor._start_maintenance_task()"},{"line_number":229,"context_line":"        periodic_processor.reset()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_85c0342c","line":226,"range":{"start_line":225,"start_character":8,"end_line":226,"end_character":24},"in_reply_to":"df87a7cf_643520f7","updated":"2017-12-09 21:07:32.000000000","message":"Again, being explicit. If the person that runs the test gets an exception then it has to guess if it\u0027s what the code was intended to test or if it\u0027s a bug in this code.\n\nThis way we are doing something like `assertNotRaises(exception, ...)` (which doesn\u0027t exist)\n\nIn this case the test will get a fail error that\u0027s triggered by us, instead of an unhandled exception just going up the stack.","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"24dd1a48ae597f2a8cbafab3fecc9bc9c4127c9d","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            periodic_processor.reset()"},{"line_number":225,"context_line":"        except AttributeError as e:"},{"line_number":226,"context_line":"            self.fail(e)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        periodic_processor._start_maintenance_task()"},{"line_number":229,"context_line":"        periodic_processor.reset()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_9d6e0dc7","line":226,"range":{"start_line":225,"start_character":8,"end_line":226,"end_character":24},"in_reply_to":"df87a7cf_85c0342c","updated":"2017-12-11 09:09:34.000000000","message":"I don\u0027t see how it makes the code clearer, every time you do something you expect assertNotRaises this doesnt mean we would wrap everything in such a construct.\n\nAlso how would this help in case of failure? If anything it might hide the original stack trace, making bugs harder to find not easier..","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"a68a30344095f7260388a7f98fae55e629af51bd","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            periodic_processor.reset()"},{"line_number":225,"context_line":"        except AttributeError as e:"},{"line_number":226,"context_line":"            self.fail(e)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        periodic_processor._start_maintenance_task()"},{"line_number":229,"context_line":"        periodic_processor.reset()"}],"source_content_type":"text/x-python","patch_set":26,"id":"df87a7cf_40a5fa45","line":226,"range":{"start_line":225,"start_character":8,"end_line":226,"end_character":24},"in_reply_to":"df87a7cf_9d6e0dc7","updated":"2017-12-11 12:03:41.000000000","message":"Done","commit_id":"73809a524aeaaebd26a9fb10c40a817417d23443"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"86632d5d1aecc27edf0169d9810205f4b2e8728e","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        mock_start.assert_called_once()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":176,"context_line":"                       \u0027sync_pending_entries\u0027, new\u003dmock.Mock())"},{"line_number":177,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":178,"context_line":"    def test_reset_called_on_sighup(self, mock_journal):"},{"line_number":179,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"df87a7cf_f6917348","line":176,"range":{"start_line":175,"start_character":4,"end_line":176,"end_character":63},"updated":"2017-12-11 15:28:39.000000000","message":"Is this even necessary?\n\nIf I delete these lines the test still works","commit_id":"621d267bb9becdaa9c203a55104110e0bf8a6481"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ede90520aeaecdfea9deb0ed8856bcfcfde9410f","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        mock_start.assert_called_once()"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":176,"context_line":"                       \u0027sync_pending_entries\u0027, new\u003dmock.Mock())"},{"line_number":177,"context_line":"    @mock.patch.object(worker.JournalPeriodicProcessor, \u0027reset\u0027)"},{"line_number":178,"context_line":"    def test_reset_called_on_sighup(self, mock_journal):"},{"line_number":179,"context_line":"        self.cfg.config(sync_timeout\u003d0, group\u003d\u0027ml2_odl\u0027)"}],"source_content_type":"text/x-python","patch_set":29,"id":"df87a7cf_4f2f5e87","line":176,"range":{"start_line":175,"start_character":4,"end_line":176,"end_character":63},"in_reply_to":"df87a7cf_f6917348","updated":"2017-12-11 16:44:59.000000000","message":"Done","commit_id":"621d267bb9becdaa9c203a55104110e0bf8a6481"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"86632d5d1aecc27edf0169d9810205f4b2e8728e","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    @mock.patch.object(periodic_task.PeriodicTask, \u0027execute_ops\u0027)"},{"line_number":219,"context_line":"    def test_reset_succeeeds_when_maintenance_task_not_setup(self,"},{"line_number":220,"context_line":"                                                             execute_mock):"},{"line_number":221,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        # NOTE(mpeterson): This tests that if calling reset without setting up"}],"source_content_type":"text/x-python","patch_set":29,"id":"df87a7cf_764d633c","line":220,"range":{"start_line":220,"start_character":61,"end_line":220,"end_character":73},"updated":"2017-12-11 15:28:39.000000000","message":"unused parameter, unless you want to check that it was never called or something","commit_id":"621d267bb9becdaa9c203a55104110e0bf8a6481"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ede90520aeaecdfea9deb0ed8856bcfcfde9410f","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    @mock.patch.object(periodic_task.PeriodicTask, \u0027execute_ops\u0027)"},{"line_number":219,"context_line":"    def test_reset_succeeeds_when_maintenance_task_not_setup(self,"},{"line_number":220,"context_line":"                                                             execute_mock):"},{"line_number":221,"context_line":"        periodic_processor \u003d worker.JournalPeriodicProcessor()"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        # NOTE(mpeterson): This tests that if calling reset without setting up"}],"source_content_type":"text/x-python","patch_set":29,"id":"df87a7cf_6fc822a5","line":220,"range":{"start_line":220,"start_character":61,"end_line":220,"end_character":73},"in_reply_to":"df87a7cf_764d633c","updated":"2017-12-11 16:44:59.000000000","message":"Done","commit_id":"621d267bb9becdaa9c203a55104110e0bf8a6481"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"4154e8ec1842e9ca0929b2fd7c1ef937955540de","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        except AttributeError:"},{"line_number":113,"context_line":"            self.fail(\u0027start() was not called before calling stop()\u0027)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def assert_process_running(self, pid):"},{"line_number":116,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":117,"context_line":"        self.assertIn(state, PROCESS_RUNNING_STATUSES)"},{"line_number":118,"context_line":"        return cmd"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_558d6379","line":115,"updated":"2017-12-14 08:25:34.000000000","message":"A function called assert_something should not be returning a value. How about assert_pid_running_and_get_cmd...or split it into two functions (though I get why you do not want to do that.) Or even just use the code in this function directly in the tests. Not a huge deal, just a thought.","commit_id":"78a9b2b171c7373fb994b01542cc819e569dbdd4"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"68d59d7acba7f4d1bb8e3b74511ae76f89b3b289","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        except AttributeError:"},{"line_number":113,"context_line":"            self.fail(\u0027start() was not called before calling stop()\u0027)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def assert_process_running(self, pid):"},{"line_number":116,"context_line":"        cmd, state \u003d self._get_pid_status(pid)"},{"line_number":117,"context_line":"        self.assertIn(state, PROCESS_RUNNING_STATUSES)"},{"line_number":118,"context_line":"        return cmd"}],"source_content_type":"text/x-python","patch_set":31,"id":"df87a7cf_fa4d2872","line":115,"in_reply_to":"df87a7cf_558d6379","updated":"2017-12-18 12:35:14.000000000","message":"I asked him to do it previously since the code was being repeated over and over again.\nYou could also claim _get_pid_status whouldn\u0027t be returning the cmd..\nSince this is unit tests I don\u0027t see a problem with this function as is since it simplifies the tests.","commit_id":"78a9b2b171c7373fb994b01542cc819e569dbdd4"}]}
