)]}'
{"tempest/config.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"c3f31008d9042a794e6f5e5bb929f8f5b197507b","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"                    \"running tempest on a real-life cloud\"),"},{"line_number":1025,"context_line":"    cfg.BoolOpt(\u0027disable_cleanup\u0027,"},{"line_number":1026,"context_line":"                default\u003dFalse,"},{"line_number":1027,"context_line":"                help\u003d\"Whether cleaning test\u0027s resources is disable or not\")"},{"line_number":1028,"context_line":"]"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_b4da7b4a","line":1027,"range":{"start_line":1027,"start_character":22,"end_line":1027,"end_character":73},"updated":"2017-03-03 03:01:31.000000000","message":"This seems a bit confusing, will it be better to say something like \"Whether to cleanup resources when testcase fails\"","commit_id":"0cdcfcca6184de7f5ac5b6cb31ffc3b0f81c5e00"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"90b131184e081d63adeacffbc4f2236a0e6a1594","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"                    \"running tempest on a real-life cloud\"),"},{"line_number":1025,"context_line":"    cfg.BoolOpt(\u0027disable_cleanup\u0027,"},{"line_number":1026,"context_line":"                default\u003dFalse,"},{"line_number":1027,"context_line":"                help\u003d\"Whether cleaning test\u0027s resources is disable or not\")"},{"line_number":1028,"context_line":"]"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_bf3cb293","line":1027,"range":{"start_line":1027,"start_character":22,"end_line":1027,"end_character":73},"in_reply_to":"ba2be162_b4da7b4a","updated":"2017-03-06 16:10:31.000000000","message":"yes, I\u0027ve forgotten to edit it","commit_id":"0cdcfcca6184de7f5ac5b6cb31ffc3b0f81c5e00"}],"tempest/test.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"c3f31008d9042a794e6f5e5bb929f8f5b197507b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    def tearDownClass(cls):"},{"line_number":279,"context_line":"        at_exit_set.discard(cls)"},{"line_number":280,"context_line":"        # omit teardown if it\u0027s enabled and the test failed"},{"line_number":281,"context_line":"        if CONF.disable_cleanup and not _get_result().wasSuccessful():"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":"        # It should never be overridden by descendants"},{"line_number":284,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027tearDownClass\u0027):"},{"line_number":285,"context_line":"            super(BaseTestCase, cls).tearDownClass()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_a7a24ffb","line":282,"range":{"start_line":281,"start_character":0,"end_line":282,"end_character":18},"updated":"2017-03-03 03:01:31.000000000","message":"this seems can only block class-wide resources from cleaning up, and resources may be cleaned up in testcase\u0027s tearDown","commit_id":"0cdcfcca6184de7f5ac5b6cb31ffc3b0f81c5e00"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"90b131184e081d63adeacffbc4f2236a0e6a1594","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    def tearDownClass(cls):"},{"line_number":279,"context_line":"        at_exit_set.discard(cls)"},{"line_number":280,"context_line":"        # omit teardown if it\u0027s enabled and the test failed"},{"line_number":281,"context_line":"        if CONF.disable_cleanup and not _get_result().wasSuccessful():"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":"        # It should never be overridden by descendants"},{"line_number":284,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027tearDownClass\u0027):"},{"line_number":285,"context_line":"            super(BaseTestCase, cls).tearDownClass()"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba2be162_ba4f6090","line":282,"range":{"start_line":281,"start_character":0,"end_line":282,"end_character":18},"in_reply_to":"ba2be162_a7a24ffb","updated":"2017-03-06 16:10:31.000000000","message":"well, yes, that is a problem, but cases where a testcase implements tearDown method itself is a few:\n $ grep -ri \"def tearDown(\"  # from tempest/tempest directory\n\nThe question is, each of those tests should be edited to ignore teardown under the circumstances?","commit_id":"0cdcfcca6184de7f5ac5b6cb31ffc3b0f81c5e00"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"8ba152e8ecb0729cb4c36301c30442e8fa795e95","unresolved":false,"context_lines":[{"line_number":278,"context_line":"    def tearDownClass(cls):"},{"line_number":279,"context_line":"        at_exit_set.discard(cls)"},{"line_number":280,"context_line":"        # omit teardown if it\u0027s enabled and the test failed"},{"line_number":281,"context_line":"        if CONF.disable_cleanup and not _get_result().wasSuccessful():"},{"line_number":282,"context_line":"            return"},{"line_number":283,"context_line":"        # It should never be overridden by descendants"},{"line_number":284,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027tearDownClass\u0027):"},{"line_number":285,"context_line":"            super(BaseTestCase, cls).tearDownClass()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a30ddce_901a756d","line":282,"range":{"start_line":281,"start_character":0,"end_line":282,"end_character":18},"in_reply_to":"ba2be162_ba4f6090","updated":"2017-03-07 01:50:53.000000000","message":"1. if testcase uses addCleanup, then the resource will be cleaned up after teardown\n   (\"Functions added with addCleanup will be called in reverse order of adding after tearDown\"),\n   so, maybe you will need to add a tearDown in test.py, something like:\n    def tearDown(self):\n        super(BaseTestCase, self).tearDown()\n        if CONF.disable_cleanup and not _get_result().wasSuccessful():\n            self._cleanups \u003d []\n\n2. as to those testcases who use tearDown directly, maybe they should change to use addCleanup if they\n   want the resource be kept after failure. \n   As we know, \"Functions added with addCleanup will be called in reverse order of adding after tearDown\",\n   so whatever we do in tearDown can be fulfilled with addCleanup.","commit_id":"0cdcfcca6184de7f5ac5b6cb31ffc3b0f81c5e00"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"a6a63731594630e6c18ab4ebfb22105e5e353fa4","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        if CONF.disable_cleanup and not _get_result().wasSuccessful():"},{"line_number":449,"context_line":"            # clean list of functions to be called after teardown"},{"line_number":450,"context_line":"            # to cleanup resources"},{"line_number":451,"context_line":"            self._cleanups \u003d []"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    @property"},{"line_number":454,"context_line":"    def credentials_provider(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ffe62b97_c80d7c91","line":451,"range":{"start_line":451,"start_character":12,"end_line":451,"end_character":31},"updated":"2017-03-24 15:46:58.000000000","message":"I understand why you do this, but _cleanups is an internal interface, so we shouldn\u0027t really be using it.","commit_id":"e036d4e3327bdbed5cef409e6d2b3b9f1e645f08"}]}
