)]}'
{"neutron/agent/l3/ha_router.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"fcae81af6153facc862b26abda0a1bf1217f3674","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_79f97b4d","line":348,"range":{"start_line":348,"start_character":23,"end_line":348,"end_character":43},"updated":"2016-12-29 08:33:15.000000000","message":"So str(signal.SIGTERM) \u003d\u003d \"Signals.SIGTERM\", not \u002715\u0027. This basically runs a \u0027kill -Signals.SIGTERM \u003cpid\u003e\u0027 command, which isn\u0027t expected to work. You probably want Signals.SIGTERM.value instead.","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7c0d3dd6d3de42831dd0041b2ac7a963af04bc1d","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_24950a40","line":348,"range":{"start_line":348,"start_character":23,"end_line":348,"end_character":43},"in_reply_to":"ba5201f7_045d66e9","updated":"2016-12-29 08:59:31.000000000","message":"This isn\u0027t true for Python 3.5:\n\nIn [3]: print(str(signal.SIGTERM))\nSignals.SIGTERM","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"d3500912c71a14a82565bd86f615aae8953c1884","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_045d66e9","line":348,"range":{"start_line":348,"start_character":23,"end_line":348,"end_character":43},"in_reply_to":"ba5201f7_79f97b4d","updated":"2016-12-29 08:50:42.000000000","message":"Even though tests passed I just tried and I think it\u0027s correct :)\n\n\u003e\u003e\u003e import signal\n\u003e\u003e\u003e print str(signal.SIGTERM)\n15","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d7a89a2376acc4d4d89c281e8c1bb128078b0206","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM.real))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_bc4ab1aa","line":348,"range":{"start_line":348,"start_character":41,"end_line":348,"end_character":46},"updated":"2017-01-03 13:16:38.000000000","message":"I find this semantically confusing - SIGTERM is not a complex number. How about\n\n str(int(signal.SIGTERM))\n\nor better would be to avoid using strings for signal values ... that would need a separate patch","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e78934b61e6b4bc434aa4f6c597ed8627e59b36f","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM.real))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_8564ade5","line":348,"range":{"start_line":348,"start_character":41,"end_line":348,"end_character":46},"in_reply_to":"ba5201f7_a21e0a61","updated":"2017-01-03 15:25:21.000000000","message":"Is it? :)","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0e6c50e7a7f0fe825166f18c54c7cf085151537","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(signal.SIGTERM.real))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_a21e0a61","line":348,"range":{"start_line":348,"start_character":41,"end_line":348,"end_character":46},"in_reply_to":"ba5201f7_bc4ab1aa","updated":"2017-01-03 15:18:16.000000000","message":"Done","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d7a89a2376acc4d4d89c281e8c1bb128078b0206","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"},{"line_number":352,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":353,"context_line":"            pm.disable(sig\u003dstr(signal.SIGKILL.real))"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def update_initial_state(self, callback):"},{"line_number":356,"context_line":"        ha_device \u003d ip_lib.IPDevice("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_dcc77510","line":353,"range":{"start_line":353,"start_character":45,"end_line":353,"end_character":50},"updated":"2017-01-03 13:16:38.000000000","message":"Ditto","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0e6c50e7a7f0fe825166f18c54c7cf085151537","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"},{"line_number":352,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":353,"context_line":"            pm.disable(sig\u003dstr(signal.SIGKILL.real))"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def update_initial_state(self, callback):"},{"line_number":356,"context_line":"        ha_device \u003d ip_lib.IPDevice("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_022a767e","line":353,"range":{"start_line":353,"start_character":45,"end_line":353,"end_character":50},"in_reply_to":"ba5201f7_dcc77510","updated":"2017-01-03 15:18:16.000000000","message":"Done","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"451c0f9997a58095ce13c5971997649db0036a84","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        pm \u003d self._get_state_change_monitor_process_manager()"},{"line_number":346,"context_line":"        process_monitor.unregister("},{"line_number":347,"context_line":"            self.router_id, IP_MONITOR_PROCESS_SERVICE)"},{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(int(signal.SIGTERM)))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_faca526d","line":348,"updated":"2017-01-04 10:41:32.000000000","message":"I\u0027d patch the ProcessManager to accept the py3 signal enums and ints, but that should be a separate patch (can I handle that?) :D\n\nI was about to say that you could remove the str, but as you pointed out (locally) we do compare: if sig \u003d\u003d \u00279\u0027 into the disable  :-(.","commit_id":"cb0ae71b7576dc732bf518d94eb58a00d66be20b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1c34fdf8a8692b48b5c51991b840da067924fd43","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        pm.disable(sig\u003dstr(int(signal.SIGTERM)))"},{"line_number":349,"context_line":"        try:"},{"line_number":350,"context_line":"            common_utils.wait_until_true(lambda: not pm.active,"},{"line_number":351,"context_line":"                                         timeout\u003dSIGTERM_TIMEOUT)"},{"line_number":352,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":353,"context_line":"            pm.disable(sig\u003dstr(int(signal.SIGKILL)))"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5201f7_b0bdb8d9","line":351,"updated":"2017-01-09 09:20:20.000000000","message":"this will conflict with one of kevins patches - https://review.openstack.org/#/c/417540/\nCan you rebase on that?","commit_id":"17c2b45d916168fa396caf1a6188e6c8a0c8d19a"}],"neutron/agent/l3/keepalived_state_change.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"fcae81af6153facc862b26abda0a1bf1217f3674","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # automatically respawned"},{"line_number":132,"context_line":"            agent_utils.kill_process(self.monitor.pid, signal.SIGKILL,"},{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_f971ebe1","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":19},"updated":"2016-12-29 08:33:15.000000000","message":"I\u0027m not too kin on using sys.exit() to exit a process (preferably we would use some kind of a flag to kill stuff), but this is a bit out of scope so \"meh\".\n\nIf you really feel like it, one could change [1] to do a \"while self.should_run\", and then we can do a \"self.monitor.should_run \u003d False\" and that would be all she wrote. But again, \"meh\" :)\n\n[1]: https://github.com/openstack/neutron/blob/master/neutron/agent/linux/async_process.py#L254","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"d3500912c71a14a82565bd86f615aae8953c1884","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # automatically respawned"},{"line_number":132,"context_line":"            agent_utils.kill_process(self.monitor.pid, signal.SIGKILL,"},{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_44f68ed8","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":19},"in_reply_to":"ba5201f7_f971ebe1","updated":"2016-12-29 08:50:42.000000000","message":"yes, i thought of it. However, since this process was killed with a SIGKILL and I\u0027m addressing the issue that the child process was left orphaned, I focused on that... i\u0027d rather leave it like so for this patch though","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d7a89a2376acc4d4d89c281e8c1bb128078b0206","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # automatically respawned"},{"line_number":132,"context_line":"            agent_utils.kill_process(self.monitor.pid, signal.SIGKILL,"},{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_7c85a9ab","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":19},"updated":"2017-01-03 13:16:38.000000000","message":"This doesn\u0027t belong here.","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0e6c50e7a7f0fe825166f18c54c7cf085151537","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            # automatically respawned"},{"line_number":132,"context_line":"            agent_utils.kill_process(self.monitor.pid, signal.SIGKILL,"},{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_22421a11","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":19},"in_reply_to":"ba5201f7_7c85a9ab","updated":"2017-01-03 15:18:16.000000000","message":"Done","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d7a89a2376acc4d4d89c281e8c1bb128078b0206","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"},{"line_number":138,"context_line":"        # \"greenthread.sleep(0)\" in utis.execute()"},{"line_number":139,"context_line":"        eventlet.spawn(self._kill_monitor)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def configure(conf):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_3c7161e1","line":139,"range":{"start_line":136,"start_character":0,"end_line":139,"end_character":42},"updated":"2017-01-03 13:16:38.000000000","message":"I don\u0027t understand the failure but won\u0027t be better to override parent method?\n\n def handle_sigterm(self, signum, frame):\n     self._kill_monitor()\n     super(self, MonitorDaemon).handle_sigterm(signum, frame)","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0e6c50e7a7f0fe825166f18c54c7cf085151537","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                     run_as_root\u003dTrue)"},{"line_number":134,"context_line":"        sys.exit(0)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def _sigterm_handler(self, signum, term):"},{"line_number":137,"context_line":"        # We need to spawn a thread here or it will fail at"},{"line_number":138,"context_line":"        # \"greenthread.sleep(0)\" in utis.execute()"},{"line_number":139,"context_line":"        eventlet.spawn(self._kill_monitor)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def configure(conf):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_32a0a543","line":139,"range":{"start_line":136,"start_character":0,"end_line":139,"end_character":42},"in_reply_to":"ba5201f7_3c7161e1","updated":"2017-01-03 15:18:16.000000000","message":"for some reason, it failed on greenthread.sleep when I first tried calling utils.execute() from the sighandler and that\u0027s why i had to spawn a new thread... reverting it back and overriding now. thanks :)","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"}],"neutron/tests/unit/agent/l3/test_ha_router.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"fcae81af6153facc862b26abda0a1bf1217f3674","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":105,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        with mock.patch(\u0027neutron.common.utils.wait_until_true\u0027)\\"},{"line_number":108,"context_line":"                as wait_until_true_mock:"},{"line_number":109,"context_line":"            wait_until_true_mock.side_effect \u003d timeout.Timeout"},{"line_number":110,"context_line":"            ri.destroy_state_change_monitor(mock_instance)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        calls \u003d [\"sig\u003d\u0027str(%d)\u0027\" % signal.SIGTERM,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_e456a205","line":109,"range":{"start_line":107,"start_character":8,"end_line":109,"end_character":62},"updated":"2016-12-29 08:33:15.000000000","message":"This can also be:\n\n with mock.patch(\u0027neutron.common.utils.wait_until_true\u0027, side_effect\u003dtimeout.Timeout) as wut_mock:\n\n(Also, this means you won\u0027t need \"wut_mock\".)\n((Also, \"wut\" is an awesome variable name ^_^))","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"d3500912c71a14a82565bd86f615aae8953c1884","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":105,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        with mock.patch(\u0027neutron.common.utils.wait_until_true\u0027)\\"},{"line_number":108,"context_line":"                as wait_until_true_mock:"},{"line_number":109,"context_line":"            wait_until_true_mock.side_effect \u003d timeout.Timeout"},{"line_number":110,"context_line":"            ri.destroy_state_change_monitor(mock_instance)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        calls \u003d [\"sig\u003d\u0027str(%d)\u0027\" % signal.SIGTERM,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_e425c25c","line":109,"range":{"start_line":107,"start_character":8,"end_line":109,"end_character":62},"in_reply_to":"ba5201f7_e456a205","updated":"2016-12-29 08:50:42.000000000","message":"ok, will do and won\u0027t use the extra variable. thanks :)\ni like wut :)","commit_id":"d90b60ceea96486a27a8a92d62716ca437c3780f"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"f0e6c50e7a7f0fe825166f18c54c7cf085151537","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        ri.destroy_state_change_monitor(mock_instance)"},{"line_number":99,"context_line":"        mock_instance.disable.assert_called_once_with("},{"line_number":100,"context_line":"            sig\u003dstr(signal.SIGTERM.real))"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_destroy_state_change_monitor_force(self):"},{"line_number":103,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_a2e8ca11","line":100,"updated":"2017-01-03 15:18:16.000000000","message":"changed to str(int(signal.SIGTERM)) too","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"121b0d58bc680796fb98bf88df76da891e0d7325","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                        side_effect\u003dtimeout.Timeout):"},{"line_number":110,"context_line":"            ri.destroy_state_change_monitor(mock_instance)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        calls \u003d [\"sig\u003d\u0027str(%d)\u0027\" % signal.SIGTERM,"},{"line_number":113,"context_line":"                 \"sig\u003d\u0027str(%d)\u0027\" % signal.SIGKILL]"},{"line_number":114,"context_line":"        mock_instance.disable.has_calls(calls)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba5201f7_817cc473","line":112,"range":{"start_line":112,"start_character":35,"end_line":112,"end_character":50},"updated":"2017-01-01 13:09:21.000000000","message":"shouldn\u0027t this be \"signal.SIGTERM.real\"?","commit_id":"c5fb3b1fe8b87b5823ebd508d1652fc0351ebc92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2f9d103f8932a7587a7df788846b63d749a70471","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_destroy_state_change_monitor_ok(self):"},{"line_number":92,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"},{"line_number":93,"context_line":"        mock_instance \u003d mock.Mock()"},{"line_number":94,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":95,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":96,"context_line":"        mock_instance.active \u003d False"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        ri.destroy_state_change_monitor(mock_instance)"},{"line_number":99,"context_line":"        mock_instance.disable.assert_called_once_with("},{"line_number":100,"context_line":"            sig\u003dstr(int(signal.SIGTERM)))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_c8ffaca8","line":98,"range":{"start_line":93,"start_character":0,"end_line":98,"end_character":54},"updated":"2017-01-03 15:57:23.000000000","message":"Preferably this would look:\n\n with mock.patch.object(ri, \u0027_get_state_change_monitor_process_manager) as m_get_state:\n     mock_pm \u003d m_get_state.return_value\n     mock_pm.active \u003d False\n     ri.destroy_state_change_monitor(mock_pm)\n\n mock_pm.disable.assert_called_once_with(...)","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"dd72fb10486658e94728ee042d3bcc0af7cbc378","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_destroy_state_change_monitor_ok(self):"},{"line_number":92,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"},{"line_number":93,"context_line":"        mock_instance \u003d mock.Mock()"},{"line_number":94,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":95,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":96,"context_line":"        mock_instance.active \u003d False"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        ri.destroy_state_change_monitor(mock_instance)"},{"line_number":99,"context_line":"        mock_instance.disable.assert_called_once_with("},{"line_number":100,"context_line":"            sig\u003dstr(int(signal.SIGTERM)))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_19c024e0","line":98,"range":{"start_line":93,"start_character":0,"end_line":98,"end_character":54},"in_reply_to":"ba5201f7_c8ffaca8","updated":"2017-01-04 10:06:14.000000000","message":"I wanted to be consistent with other tests in this file but I\u0027ll change it since I agree that it\u0027s best to stick with the \"with mock.patch\" approach :) Thanks","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2f9d103f8932a7587a7df788846b63d749a70471","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_destroy_state_change_monitor_force(self):"},{"line_number":103,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"},{"line_number":104,"context_line":"        mock_instance \u003d mock.Mock()"},{"line_number":105,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":106,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_482adc2d","line":104,"updated":"2017-01-03 15:57:23.000000000","message":"Similarly here.","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"dd72fb10486658e94728ee042d3bcc0af7cbc378","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_destroy_state_change_monitor_force(self):"},{"line_number":103,"context_line":"        ri \u003d self._create_router(mock.MagicMock())"},{"line_number":104,"context_line":"        mock_instance \u003d mock.Mock()"},{"line_number":105,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":106,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_39b7a887","line":104,"in_reply_to":"ba5201f7_482adc2d","updated":"2017-01-04 10:06:14.000000000","message":"same","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2f9d103f8932a7587a7df788846b63d749a70471","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":106,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        with mock.patch(\u0027neutron.common.utils.wait_until_true\u0027,"},{"line_number":109,"context_line":"                        side_effect\u003dtimeout.Timeout):"},{"line_number":110,"context_line":"            ri.destroy_state_change_monitor(mock_instance)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_68d24002","line":108,"range":{"start_line":108,"start_character":24,"end_line":108,"end_character":61},"updated":"2017-01-03 15:57:23.000000000","message":"How about mocking ha_router.SIGTERM_TIMEOUT to 0 instead? This way it wouldn\u0027t test that \"if wait_until_true raises Timeout\" but \"if wait_until_true times out\".","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"dd72fb10486658e94728ee042d3bcc0af7cbc378","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        ri._get_state_change_monitor_process_manager \u003d ("},{"line_number":106,"context_line":"            mock.Mock(return_value\u003dmock_instance))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        with mock.patch(\u0027neutron.common.utils.wait_until_true\u0027,"},{"line_number":109,"context_line":"                        side_effect\u003dtimeout.Timeout):"},{"line_number":110,"context_line":"            ri.destroy_state_change_monitor(mock_instance)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_64f24b71","line":108,"range":{"start_line":108,"start_character":24,"end_line":108,"end_character":61},"in_reply_to":"ba5201f7_68d24002","updated":"2017-01-04 10:06:14.000000000","message":"Done","commit_id":"2a7d7386fdb19aff0d14c18a62fe8489858167fc"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"b07fbcae936a63bf204f2023d441708ebbf25f78","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                as m_get_state:"},{"line_number":107,"context_line":"            mock_pm \u003d m_get_state.return_value"},{"line_number":108,"context_line":"            mock_pm.active \u003d False"},{"line_number":109,"context_line":"            ri.destroy_state_change_monitor(mock_pm)"},{"line_number":110,"context_line":"            with mock.patch.object(ha_router, \u0027SIGTERM_TIMEOUT\u0027, 0):"},{"line_number":111,"context_line":"                ri.destroy_state_change_monitor(mock_pm)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5201f7_fc005268","line":109,"updated":"2017-01-05 16:48:53.000000000","message":"Do you need to make this first call?  Wouldn\u0027t L111 trigger the timeout and subsequent SIGKILL?","commit_id":"cb0ae71b7576dc732bf518d94eb58a00d66be20b"}]}
