)]}'
{"networking_odl/tests/unit/journal/test_periodic_task.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"c171b1c27fcafd9a0042e006590c4ecda224ec98","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":178,"context_line":"            self.assertEqual(count[0], 1)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            # NOTE(mpeterson): We want to avoid an infinite execution of"},{"line_number":181,"context_line":"            # the manual call to execute_ops if the code is not behaving as"},{"line_number":182,"context_line":"            # expected."},{"line_number":183,"context_line":"            def handler(signum, frame):"},{"line_number":184,"context_line":"                continue_event.set()"},{"line_number":185,"context_line":"            signal.signal(signal.SIGALRM, handler)"},{"line_number":186,"context_line":"            signal.alarm(1)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            self.thread.execute_ops()"},{"line_number":189,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f485f77_f1ac788d","line":186,"range":{"start_line":180,"start_character":11,"end_line":186,"end_character":27},"updated":"2017-11-13 16:07:47.000000000","message":"actually I just had an idea and this could be refactored to simplify it","commit_id":"ad9b29a3a74cf35829087b334c5de30967525a88"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f7eb5b0d0b5192f48d6f044aa548e8536bf72290","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_no_multiple_executions_simultaneously(self, mock_exec_recently):"},{"line_number":154,"context_line":"        continue_event \u003d threading.Event()"},{"line_number":155,"context_line":"        trigger_event \u003d threading.Event()"},{"line_number":156,"context_line":"        count \u003d [0]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def wait_until_event(context):"},{"line_number":159,"context_line":"            trigger_event.set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_71c75614","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":19},"updated":"2017-11-14 06:09:10.000000000","message":"Since only count[0] is used, list isn\u0027t needed.\njust count \u003d 0","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ac05a1579a6113bbb48944679a94578fc58b3ae8","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_no_multiple_executions_simultaneously(self, mock_exec_recently):"},{"line_number":154,"context_line":"        continue_event \u003d threading.Event()"},{"line_number":155,"context_line":"        trigger_event \u003d threading.Event()"},{"line_number":156,"context_line":"        count \u003d [0]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def wait_until_event(context):"},{"line_number":159,"context_line":"            trigger_event.set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_8cfd19b3","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":19},"in_reply_to":"1f485f77_71c75614","updated":"2017-11-14 06:41:15.000000000","message":"In python2 a local variable to the method cannot be assigned inside a closure. However, such variable can be muted. \n\nIn python3 there is a mechanism ‘nonlocal’ that addresses this, but for compatibility purposes we need a solution that’s supported in both versions.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bdcb18cfbc903b24fc33315dc4cf992395274908","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_no_multiple_executions_simultaneously(self, mock_exec_recently):"},{"line_number":154,"context_line":"        continue_event \u003d threading.Event()"},{"line_number":155,"context_line":"        trigger_event \u003d threading.Event()"},{"line_number":156,"context_line":"        count \u003d [0]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def wait_until_event(context):"},{"line_number":159,"context_line":"            trigger_event.set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_eb67ca50","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":19},"in_reply_to":"1f485f77_8cfd19b3","updated":"2017-11-14 14:26:29.000000000","message":"Perhpas you can add a TODO to fix this when py2 is no longer supported","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    def test_no_multiple_executions_simultaneously(self, mock_exec_recently):"},{"line_number":154,"context_line":"        continue_event \u003d threading.Event()"},{"line_number":155,"context_line":"        trigger_event \u003d threading.Event()"},{"line_number":156,"context_line":"        count \u003d [0]"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        def wait_until_event(context):"},{"line_number":159,"context_line":"            trigger_event.set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_0ade8810","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":19},"in_reply_to":"1f485f77_eb67ca50","updated":"2017-11-15 11:05:49.000000000","message":"Done","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"973c261a4ce6227e0beb523f4afa554070c1c198","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        self.thread.register_operation(wait_until_event)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        def assert_not_called_with(mock_, *args):"},{"line_number":166,"context_line":"            call_args_list \u003d mock_.call_args_list[:]"},{"line_number":167,"context_line":"            for call in call_args_list:"},{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_f20d843e","line":168,"range":{"start_line":165,"start_character":0,"end_line":168,"end_character":38},"updated":"2017-11-14 08:34:43.000000000","message":"+1, Could you please put it somewhere, we can reuse this part. So that everyone does not have to reinvent their own way to achieve it.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        self.thread.register_operation(wait_until_event)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        def assert_not_called_with(mock_, *args):"},{"line_number":166,"context_line":"            call_args_list \u003d mock_.call_args_list[:]"},{"line_number":167,"context_line":"            for call in call_args_list:"},{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_ca5cf07f","line":168,"range":{"start_line":165,"start_character":0,"end_line":168,"end_character":38},"in_reply_to":"1f485f77_f20d843e","updated":"2017-11-15 11:05:49.000000000","message":"Done","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bdcb18cfbc903b24fc33315dc4cf992395274908","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_8b95f6e6","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"updated":"2017-11-14 14:26:29.000000000","message":"I wouldn\u0027t check the logging as it\u0027s not a good enough indication if the task has been executed or not, instead I\u0027d just check the outcome of the task. i.e. if it was executed you\u0027d expect the count to increase and the lock released, otherwise you\u0027d expect the count to remain and the lock to remain held.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"3051529e482af5f5bb7f9988822617d3bdb437c6","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_339098ed","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_198dc07a","updated":"2017-11-15 12:47:05.000000000","message":"Not sure what you meant, you\u0027re still checking the logging..\nIf the log message changes it would break the test though I think that\u0027s a bit harsh.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"606e107662be19cb7dccc91e5e2ef7b90647176b","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_5672e27c","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_339098ed","updated":"2017-11-15 13:20:59.000000000","message":"You don\u0027t want to check logging at all? I agree that checking for that particular message is not the ideal solution, but logging is part of the functionality we expect. \n\nLet\u0027s do a compromise solution, I\u0027ll move the message to a constant and reference the constant instead. Does that work for you?","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"9e6534f82ef108a92980338b5380afcefcde65f5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_ddc24f34","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_44e455e1","updated":"2017-11-16 11:34:06.000000000","message":"\u003e\u003eIt\u0027s separation of concerns since logging is auxiliary and if it needs to be tested then add tests to the whole thing.\n\nThere are tests, which assert for logs. And we have to do it for rest of the code as well. They show up on console during testing as well.\n\n\u003e\u003e It won\u0027t be replication of code since you can extract the \"set up\" code for each scenario and reuse it, so I\u0027m not convinced by this argument.\n\nEven then there will be some statements for test cases definition, which is not required.\n\n\u003e\u003eAs it stands this only tests one logging message while others exist in this code path and aren\u0027t tested at all\n\nThey should also be mocked.\n\nHow does it help separation of test cases for auxiliary and non-auxiliary?\n\nEven if you guys don\u0027t want to assert on message. I would like atleast to be mocked.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"42ab8dac06960de4474076e6d43e8f8e3cd171fe","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_df85b1d0","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_47e22ea2","updated":"2017-11-16 03:17:33.000000000","message":"Writing different test only for logging is not a good idea. We will have to create and setup things, we are doing here, it is mostly replication of code except asserting different things.\n\nit is critical issue, i would prefer to get it merged ASAP.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"81f091e64e87a915cec3e325358db85c64103027","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_d9e3a3d8","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_5672e27c","updated":"2017-11-15 13:55:13.000000000","message":"If you\u0027re keen on checking the logging it should be done in separate tests to test all the logging messages not only this one.\n\nSince logging is an auxiliary behavior, I don\u0027t think it need to be tested here since it makes the test more complicated than it should be.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_198dc07a","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_8b95f6e6","updated":"2017-11-15 11:05:49.000000000","message":"Done","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f24ed7c5c3539910b840c3709cb4aff0aea28aaf","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_f94d3f9a","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_d9e3a3d8","updated":"2017-11-15 14:08:20.000000000","message":"I beg to differ. We need a third party judge. These are my arguments:\n\n1. From a TDD standpoint any line in the code needs to be justified by a test. According to my way of thinking, if we remove this test then we should delete the logging. \n2. It does not make sense to decouple the functionality and the logging into two separate tests, that goes against maintainability complicating the code even more. BTW also it\u0027s part of the same behavior we expect under the same conditions, decoupling would mean having to create two tests that recreate the same conditions but assert different things, ergo complicating the tests even more.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5f23157ff98ec0db056c63a6fc718758a15ec443","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_44e455e1","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_df85b1d0","updated":"2017-11-16 06:53:00.000000000","message":"\u003e Writing different test only for logging is not a good idea\n\nI have to disagree.\nIt\u0027s separation of concerns since logging is auxiliary and if it needs to be tested then add tests to the whole thing.\n\n\u003e We will have to create and setup things, we are doing here, it is mostly replication of code except asserting different things.\n\nIt won\u0027t be replication of code since you can extract the \"set up\" code for each scenario and reuse it, so I\u0027m not convinced by this argument.\n\nAgain I propose to have this fix without testing logging, and then we can have different tests to test logs if and how we chose to do them.\nAs it stands this only tests one logging message while others exist in this code path and aren\u0027t tested at all.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"cacd083d879361dcb360c1e512a5a9a1c6910f07","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                assert call !\u003d (args,)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        msg \u003d \"Periodic %s task already running task\""},{"line_number":171,"context_line":"        with mock.patch.object(periodic_task.LOG, \u0027info\u0027) as mock_log_info:"},{"line_number":172,"context_line":"            self.thread.start()"},{"line_number":173,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":174,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_47e22ea2","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":75},"in_reply_to":"1f485f77_f94d3f9a","updated":"2017-11-15 15:13:44.000000000","message":"Since this issue is rather critical, I suggest we move on without testing the logging and discuss where and how to add it in a different patch.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"973c261a4ce6227e0beb523f4afa554070c1c198","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            mock_log_info.reset_mock()"},{"line_number":178,"context_line":"            self.thread.execute_ops()"},{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_8650550c","line":178,"range":{"start_line":178,"start_character":0,"end_line":178,"end_character":37},"updated":"2017-11-14 08:34:43.000000000","message":"Seems ok, but it will be better if called through other instance of periodic task. That\u0027s how this condition will occur, right? Like we have different processes on the different host.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            mock_log_info.reset_mock()"},{"line_number":178,"context_line":"            self.thread.execute_ops()"},{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_744b9b2a","line":178,"range":{"start_line":178,"start_character":0,"end_line":178,"end_character":37},"in_reply_to":"1f485f77_8650550c","updated":"2017-11-15 11:05:49.000000000","message":"This creates the same situation, no need to create another thread and increase the complexity.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bdcb18cfbc903b24fc33315dc4cf992395274908","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":183,"context_line":"            continue_event.set()"},{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_2b7042dc","line":182,"range":{"start_line":182,"start_character":12,"end_line":182,"end_character":41},"updated":"2017-11-14 14:26:29.000000000","message":"What\u0027s the purpose of this check?","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":183,"context_line":"            continue_event.set()"},{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_7474bb68","line":182,"range":{"start_line":182,"start_character":12,"end_line":182,"end_character":41},"in_reply_to":"1f485f77_2b7042dc","updated":"2017-11-15 11:05:49.000000000","message":"Done","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"606e107662be19cb7dccc91e5e2ef7b90647176b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":183,"context_line":"            continue_event.set()"},{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_d6c25259","line":182,"range":{"start_line":182,"start_character":12,"end_line":182,"end_character":41},"in_reply_to":"1f485f77_53b0b48a","updated":"2017-11-15 13:20:59.000000000","message":"I had changed the structure of the test so it now made more sense, specially based on your comments. \n\nNow, yes it continues to be there, the idea is to be explicit about what we expect in each step of the test.","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"3051529e482af5f5bb7f9988822617d3bdb437c6","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            mock_log_info.assert_called_with(msg, \u0027test-maintenance\u0027)"},{"line_number":180,"context_line":"            mock_log_info.reset_mock()"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            self.assertEqual(count[0], 0)"},{"line_number":183,"context_line":"            continue_event.set()"},{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_53b0b48a","line":182,"range":{"start_line":182,"start_character":12,"end_line":182,"end_character":41},"in_reply_to":"1f485f77_7474bb68","updated":"2017-11-15 12:47:05.000000000","message":"What do you mean \u0027Done\u0027?","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"973c261a4ce6227e0beb523f4afa554070c1c198","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":186,"context_line":"            self.assertGreaterEqual(count[0], 1)"},{"line_number":187,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_1786d2dc","line":187,"range":{"start_line":187,"start_character":55,"end_line":187,"end_character":72},"updated":"2017-11-14 08:34:43.000000000","message":"Could this be made variable and used at all the places?","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"bdcb18cfbc903b24fc33315dc4cf992395274908","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":186,"context_line":"            self.assertGreaterEqual(count[0], 1)"},{"line_number":187,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_2bbba272","line":187,"range":{"start_line":187,"start_character":55,"end_line":187,"end_character":72},"in_reply_to":"1f485f77_1786d2dc","updated":"2017-11-14 14:26:29.000000000","message":"+1 for making this a \"constant\"","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f4dfb9a795c22e6b1601b9e00130b86e795d5fc0","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            trigger_event.clear()"},{"line_number":185,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":186,"context_line":"            self.assertGreaterEqual(count[0], 1)"},{"line_number":187,"context_line":"            assert_not_called_with(mock_log_info, msg, \u0027test-maintenance\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f485f77_346e4395","line":187,"range":{"start_line":187,"start_character":55,"end_line":187,"end_character":72},"in_reply_to":"1f485f77_2bbba272","updated":"2017-11-15 11:05:49.000000000","message":"Done","commit_id":"bcb1bf500d6276d243f0372af62252f58347b7e5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"3051529e482af5f5bb7f9988822617d3bdb437c6","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            row \u003d (self.db_session.query(models.OpenDaylightPeriodicTask)"},{"line_number":174,"context_line":"                                  .filter_by(state\u003dodl_const.PROCESSING,"},{"line_number":175,"context_line":"                                             task\u003dTEST_TASK_NAME)"},{"line_number":176,"context_line":"                                  .with_for_update().one_or_none())"},{"line_number":177,"context_line":"            return (row is not None)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        msg \u003d \"Periodic %s task already running task\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_93486c87","line":176,"range":{"start_line":176,"start_character":34,"end_line":176,"end_character":52},"updated":"2017-11-15 12:47:05.000000000","message":"Unnecessary","commit_id":"525e7a6d7460abd443d715715711500d5f9127f5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"606e107662be19cb7dccc91e5e2ef7b90647176b","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            row \u003d (self.db_session.query(models.OpenDaylightPeriodicTask)"},{"line_number":174,"context_line":"                                  .filter_by(state\u003dodl_const.PROCESSING,"},{"line_number":175,"context_line":"                                             task\u003dTEST_TASK_NAME)"},{"line_number":176,"context_line":"                                  .with_for_update().one_or_none())"},{"line_number":177,"context_line":"            return (row is not None)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        msg \u003d \"Periodic %s task already running task\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_b63eb688","line":176,"range":{"start_line":176,"start_character":34,"end_line":176,"end_character":52},"in_reply_to":"1f485f77_93486c87","updated":"2017-11-15 13:20:59.000000000","message":"Done - copy/paste dumbness","commit_id":"525e7a6d7460abd443d715715711500d5f9127f5"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"3051529e482af5f5bb7f9988822617d3bdb437c6","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            trigger_event.clear()"},{"line_number":196,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":197,"context_line":"            self.thread.cleanup()"},{"line_number":198,"context_line":"            self.assertGreaterEqual(count[0], 1)"},{"line_number":199,"context_line":"            self.assert_not_called_with(mock_log_info, msg, TEST_TASK_NAME)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_532314be","line":198,"range":{"start_line":198,"start_character":12,"end_line":198,"end_character":48},"updated":"2017-11-15 12:47:05.000000000","message":"Don\u0027t you want to additionally check lock was released?","commit_id":"525e7a6d7460abd443d715715711500d5f9127f5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"606e107662be19cb7dccc91e5e2ef7b90647176b","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            trigger_event.clear()"},{"line_number":196,"context_line":"            utils.wait_until_true(trigger_event.is_set, 5, 0.01)"},{"line_number":197,"context_line":"            self.thread.cleanup()"},{"line_number":198,"context_line":"            self.assertGreaterEqual(count[0], 1)"},{"line_number":199,"context_line":"            self.assert_not_called_with(mock_log_info, msg, TEST_TASK_NAME)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f485f77_5649c22e","line":198,"range":{"start_line":198,"start_character":12,"end_line":198,"end_character":48},"in_reply_to":"1f485f77_532314be","updated":"2017-11-15 13:20:59.000000000","message":"Yes, I had it, I must have deleted it by accident.","commit_id":"525e7a6d7460abd443d715715711500d5f9127f5"}]}
