)]}'
{"releasenotes/notes/pause_teardown-45c9d60ffa889f7f.yaml":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"dbff0cc48936f05b58c7289544eaea9f19563b78","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Pause teardown"},{"line_number":5,"context_line":"    When pause_teardown flag in tempest.conf is set to True a pdb breakpoint"},{"line_number":6,"context_line":"    is added to tearDown and tearDownClass methods in test.py."},{"line_number":7,"context_line":"    This allows to pause cleaning resources process, so that, used resources"},{"line_number":8,"context_line":"    can be examined. Closer examination of used resources may lead to faster"},{"line_number":9,"context_line":"    debugging."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f201791_b370a641","line":7,"range":{"start_line":7,"start_character":60,"end_line":7,"end_character":61},"updated":"2017-06-28 15:16:48.000000000","message":"nit: no comma needed here","commit_id":"fb2c79781099510cc4483d44ee44c8233fcf4436"}],"tempest/config.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"dbff0cc48936f05b58c7289544eaea9f19563b78","unresolved":false,"context_lines":[{"line_number":1070,"context_line":"                                 \"prefix to ideintify resources which are \""},{"line_number":1071,"context_line":"                                 \"created by Tempest and no projects set \""},{"line_number":1072,"context_line":"                                 \"this option on OpenStack dev community.\"),"},{"line_number":1073,"context_line":"    cfg.BoolOpt(\u0027pause_teardown\u0027,"},{"line_number":1074,"context_line":"                default\u003dFalse,"},{"line_number":1075,"context_line":"                help\u003d\"Whether to pause a test in global teardown\"),"},{"line_number":1076,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_7367ae4e","line":1073,"range":{"start_line":1073,"start_character":17,"end_line":1073,"end_character":31},"updated":"2017-06-28 15:16:48.000000000","message":"I have a question about this: For me this works when I run Tempest tests a certain way but using tox -eall for example this will raise a BdbQuit. If this is expected, then maybe it would be useful to say how to run Tempest with this flag set to True in the \"help\" section below?","commit_id":"fb2c79781099510cc4483d44ee44c8233fcf4436"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"9b1831fbd16cdc89827b2714d3cc1a3c77be4ae4","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                                 \"this option on OpenStack dev community.\"),"},{"line_number":1073,"context_line":"    cfg.BoolOpt(\u0027pause_teardown\u0027,"},{"line_number":1074,"context_line":"                default\u003dFalse,"},{"line_number":1075,"context_line":"                help\u003d\"\"\"Whether to pause a test in global teardown."},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"The best use case is investigating used resources of one test."},{"line_number":1078,"context_line":"A test can be run as follows:"},{"line_number":1079,"context_line":" $ ostestr --pdb TEST_ID"},{"line_number":1080,"context_line":"or"},{"line_number":1081,"context_line":" $ python -m testtools.run TEST_ID\"\"\"),"},{"line_number":1082,"context_line":"]"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_f2aa6483","line":1081,"range":{"start_line":1075,"start_character":20,"end_line":1081,"end_character":37},"updated":"2017-06-30 03:38:28.000000000","message":"nit: using docstring here will make the code look not so clear, so better to use multiline strings, as other itmes do","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"9b2b56aaa03290363ed1a392f73af44689f5e590","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                                 \"this option on OpenStack dev community.\"),"},{"line_number":1073,"context_line":"    cfg.BoolOpt(\u0027pause_teardown\u0027,"},{"line_number":1074,"context_line":"                default\u003dFalse,"},{"line_number":1075,"context_line":"                help\u003d\"\"\"Whether to pause a test in global teardown."},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"The best use case is investigating used resources of one test."},{"line_number":1078,"context_line":"A test can be run as follows:"},{"line_number":1079,"context_line":" $ ostestr --pdb TEST_ID"},{"line_number":1080,"context_line":"or"},{"line_number":1081,"context_line":" $ python -m testtools.run TEST_ID\"\"\"),"},{"line_number":1082,"context_line":"]"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_cb63191a","line":1081,"range":{"start_line":1075,"start_character":20,"end_line":1081,"end_character":37},"in_reply_to":"3f1d235d_f2aa6483","updated":"2017-06-30 23:38:22.000000000","message":"I can edit it in the next patch set.","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"}],"tempest/test.py":[{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"ef5506c4e4d6b2910d3546481feb4f9934d22a8d","unresolved":false,"context_lines":[{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    @classmethod"},{"line_number":296,"context_line":"    def insert_pdb_breakpoint(cls):"},{"line_number":297,"context_line":"        \"\"\"Add pdb breakpoint when pause_teardown is enabled."},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        This could help in debugging process, Cleaning of resources is"},{"line_number":300,"context_line":"        paused, so they ca be examined."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f201791_6c5ee976","line":297,"updated":"2017-06-27 07:50:06.000000000","message":"I feel this can be misleading. this method doesn\u0027t care about pause_teardown config.","commit_id":"c5a87643f23cf84c6b82096e92f37185e41ef58d"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"dbff0cc48936f05b58c7289544eaea9f19563b78","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        \"\"\"Add pdb breakpoint."},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"        This can help in debugging process, cleaning of resources is"},{"line_number":300,"context_line":"        paused, so they ca be examined."},{"line_number":301,"context_line":"        \"\"\""},{"line_number":302,"context_line":"        import pdb"},{"line_number":303,"context_line":"        pdb.set_trace()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_53827201","line":300,"range":{"start_line":300,"start_character":24,"end_line":300,"end_character":26},"updated":"2017-06-28 15:16:48.000000000","message":"can","commit_id":"fb2c79781099510cc4483d44ee44c8233fcf4436"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"9b1831fbd16cdc89827b2714d3cc1a3c77be4ae4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                del trace  # to avoid circular refs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @classmethod"},{"line_number":249,"context_line":"    def tearDownClass(cls):"},{"line_number":250,"context_line":"        # insert pdb breakpoint when pause_teardown is enabled"},{"line_number":251,"context_line":"        if CONF.pause_teardown:"},{"line_number":252,"context_line":"            cls.insert_pdb_breakpoint()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_92f6908f","line":249,"range":{"start_line":249,"start_character":4,"end_line":249,"end_character":21},"updated":"2017-06-30 03:38:28.000000000","message":"I wonder why we add pdb in both tearDown and tearDownClass?\nthe resource cleanup sequence is:\n* testcase\u0027s tearDown\n* actions added with addCleanup\n* tearDownClass\nIs there any special reason to add pdb in tearDown and tearDownClass?","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"0185dea3667b29e5658823eb6e55760f9d09229b","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                del trace  # to avoid circular refs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @classmethod"},{"line_number":249,"context_line":"    def tearDownClass(cls):"},{"line_number":250,"context_line":"        # insert pdb breakpoint when pause_teardown is enabled"},{"line_number":251,"context_line":"        if CONF.pause_teardown:"},{"line_number":252,"context_line":"            cls.insert_pdb_breakpoint()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_80e1292d","line":249,"range":{"start_line":249,"start_character":4,"end_line":249,"end_character":21},"in_reply_to":"3f1d235d_0ac42f5e","updated":"2017-07-05 05:56:38.000000000","message":"Yes this can be used for the scenario that users already know the testcase will fail, and this is simple comparing to judging\nwhether an error occurs, so I am ok with it for now. We can improve it if we have better solution in the future.","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"1d1f8f1bcf53f3127e841b3730b2243470d7cf40","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                del trace  # to avoid circular refs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @classmethod"},{"line_number":249,"context_line":"    def tearDownClass(cls):"},{"line_number":250,"context_line":"        # insert pdb breakpoint when pause_teardown is enabled"},{"line_number":251,"context_line":"        if CONF.pause_teardown:"},{"line_number":252,"context_line":"            cls.insert_pdb_breakpoint()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_0ac42f5e","line":249,"range":{"start_line":249,"start_character":4,"end_line":249,"end_character":21},"in_reply_to":"3f1d235d_2c4ef56e","updated":"2017-07-04 10:46:39.000000000","message":"To find out if the test failed or not is problematic. We\u0027ve already dealt with that once, here: https://review.openstack.org/#/c/409210/9/tempest/test.py\n_get_result method was used there but it was closed as a hack.\n\nIf we take into account, this feature will be used (probably more) on tests, the user already knows they\u0027re failing, inserting the breakpoint only when a test failed is maybe not needed.","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"9b2b56aaa03290363ed1a392f73af44689f5e590","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                del trace  # to avoid circular refs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @classmethod"},{"line_number":249,"context_line":"    def tearDownClass(cls):"},{"line_number":250,"context_line":"        # insert pdb breakpoint when pause_teardown is enabled"},{"line_number":251,"context_line":"        if CONF.pause_teardown:"},{"line_number":252,"context_line":"            cls.insert_pdb_breakpoint()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_d69bbcc6","line":249,"range":{"start_line":249,"start_character":4,"end_line":249,"end_character":21},"in_reply_to":"3f1d235d_92f6908f","updated":"2017-06-30 23:38:22.000000000","message":"Actually that\u0027s just thing which was created during the development. First I had  the breakpoint in tearDown, then I realized it\u0027s not enough, because it\u0027s not invoked, when an error occurs during the setup process. So another breakpoint was added to tearDownClass ...\n\nBut if I\u0027m thinking about it now, it\u0027s useless to be able to watch resources after each test, because the tests are independent. In that case, we\u0027ll run just a single test. So therefor it should be enough to have the breakpoint only in tearDownClass. Thanks for notifying me. So if I didn\u0027t overlook anything, I\u0027ll change that in the next patchset too.","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"8f563b395d61d133933ff3953be213dd04630c99","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                del trace  # to avoid circular refs"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @classmethod"},{"line_number":249,"context_line":"    def tearDownClass(cls):"},{"line_number":250,"context_line":"        # insert pdb breakpoint when pause_teardown is enabled"},{"line_number":251,"context_line":"        if CONF.pause_teardown:"},{"line_number":252,"context_line":"            cls.insert_pdb_breakpoint()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f1d235d_2c4ef56e","line":249,"range":{"start_line":249,"start_character":4,"end_line":249,"end_character":21},"in_reply_to":"3f1d235d_d69bbcc6","updated":"2017-07-04 01:18:19.000000000","message":"Now I changed my mind, because if we only add breakpoint in tearDownClass, then some resources may have been deleted in tearDown. \nBesides, can we only enter pdb when error occurs? Maybe it will be more useful","commit_id":"ae155b70952a196751bb9c83af818810cc7288ab"}]}
