)]}'
{"HACKING.rst":[{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"8fbd5c4708893e5b1873a5f81069bf2ef06f83ce","unresolved":false,"context_lines":[{"line_number":126,"context_line":"by test classes. Set-up stages are:"},{"line_number":127,"context_line":"- `skip_checks`"},{"line_number":128,"context_line":"- `pre_setup_hook`"},{"line_number":129,"context_line":"- `setup_credentials`"},{"line_number":130,"context_line":"- `setup_clients`"},{"line_number":131,"context_line":"- `resource_setup`"},{"line_number":132,"context_line":"- `post_setup_hook`"}],"source_content_type":"text/x-rst","patch_set":9,"id":"5a890539_f6da5116","line":129,"updated":"2014-11-09 08:35:57.000000000","message":"what if you need credential for some of the skip checks? for example - secgroup_basic_ops checks that a secondary tenant is available, based on the credentials loaded","commit_id":"83471ec15cbe2d9a770b5becbc3fb4d335687558"}],"tempest/test.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"36e7b838d71d6b241b517cb5fb4e039533676c3e","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # No test resource is allocated until here"},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            # Allocation of all required credentials and client managers"},{"line_number":266,"context_line":"            cls.setup_credentials()"},{"line_number":267,"context_line":"            # Shortcuts to clients"},{"line_number":268,"context_line":"            cls.setup_clients()"},{"line_number":269,"context_line":"            # Additional classwide test resources"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_425ef413","line":266,"updated":"2014-10-09 20:00:53.000000000","message":"So what we need here is to make sure we\u0027re only calling teardown methods appropriate for what gets run.  That coupled with make the expected exceptions specific to the stage. I feel that is the real vaue here. Just doing the setup staging under a big try block doesn\u0027t provide us any extra value. I\u0027d like to see the framework patch show both sides of things, so that way when we start splitting test classes we\u0027re all set and the picture is complete.\n\nAt a really really rough level (because comments suck for this) something like:\n\ntear_down_list \u003d {\u0027creds\u0027: False,\n\u0027clients\u0027: False,\n\u0027resource\u0027: False,\n\u0027post\u0027, False,}\n\ntry:\n   cls.setup_creds()\n   tear_down_list[\u0027creds\u0027] \u003d True\nexcept (invalidCONFIG,...):\n    run_tearDowns()\ntry:\n   cls.setup_clients\n   teardown_list[\u0027clients\u0027] \u003d True\nexcept (InvalidAttr,...):\n   run_tearDowns()\n...\n\nrun_tearDowns():\nif tear_down_list[\u0027post\u0027]:\n    try:\n        cleanup_post()\n    except(Expected errors):\n        LOG.warn(\u0027\u0027)\nif tear_down_list[\u0027resource]:\n\n...\n\nAlthough probably using a proper lifo would be better than that hacky dict.","commit_id":"188b4074f1b1e434bb234291909729ba94afd887"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":258,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":259,"context_line":"        # Stack of (name, callable) to be invoked in reverse order at teardown"},{"line_number":260,"context_line":"        cls.teardowns \u003d []"},{"line_number":261,"context_line":"        # All checks that may generate a skip"},{"line_number":262,"context_line":"        cls.skip_checks()"},{"line_number":263,"context_line":"        # Additional setup code that does not a teardown"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_652ef744","line":260,"updated":"2014-10-26 07:39:56.000000000","message":"might be a stupid question, but why is this different from the addCleanup tool?","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"108481167eb7790d60f4b6d1bcd51b28d0aa2282","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":258,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":259,"context_line":"        # Stack of (name, callable) to be invoked in reverse order at teardown"},{"line_number":260,"context_line":"        cls.teardowns \u003d []"},{"line_number":261,"context_line":"        # All checks that may generate a skip"},{"line_number":262,"context_line":"        cls.skip_checks()"},{"line_number":263,"context_line":"        # Additional setup code that does not a teardown"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_96cf8555","line":260,"in_reply_to":"9aa7fdbe_4382c100","updated":"2014-10-27 12:20:13.000000000","message":"Done","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":258,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":259,"context_line":"        # Stack of (name, callable) to be invoked in reverse order at teardown"},{"line_number":260,"context_line":"        cls.teardowns \u003d []"},{"line_number":261,"context_line":"        # All checks that may generate a skip"},{"line_number":262,"context_line":"        cls.skip_checks()"},{"line_number":263,"context_line":"        # Additional setup code that does not a teardown"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_4382c100","line":260,"in_reply_to":"9aa7fdbe_652ef744","updated":"2014-10-27 11:43:20.000000000","message":"This is for class level. The stack of teardown passed via  addCleanup is cleared by the framework after each test execution.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        cls.teardowns \u003d []"},{"line_number":261,"context_line":"        # All checks that may generate a skip"},{"line_number":262,"context_line":"        cls.skip_checks()"},{"line_number":263,"context_line":"        # Additional setup code that does not a teardown"},{"line_number":264,"context_line":"        cls.pre_setup_hook()"},{"line_number":265,"context_line":"        # No test resource is allocated until here"},{"line_number":266,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_e5fae7bb","line":263,"updated":"2014-10-26 07:39:56.000000000","message":"nit: this comment is unclear","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        cls.teardowns \u003d []"},{"line_number":261,"context_line":"        # All checks that may generate a skip"},{"line_number":262,"context_line":"        cls.skip_checks()"},{"line_number":263,"context_line":"        # Additional setup code that does not a teardown"},{"line_number":264,"context_line":"        cls.pre_setup_hook()"},{"line_number":265,"context_line":"        # No test resource is allocated until here"},{"line_number":266,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_63850506","line":263,"in_reply_to":"9aa7fdbe_e5fae7bb","updated":"2014-10-27 11:43:20.000000000","message":"\"Additional setup code that does not require a teardown\"\n\nI\u0027ll fix this, thanks","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        except Exception:"},{"line_number":279,"context_line":"            etype, value, trace \u003d sys.exc_info()"},{"line_number":280,"context_line":"            LOG.info(\"%s in resource setup. Invoking tearDownClass.\" % etype)"},{"line_number":281,"context_line":"            # Catch any exception in tearDown so we can re-raise the original"},{"line_number":282,"context_line":"            # exception at the end"},{"line_number":283,"context_line":"            cls.tearDownClass()"},{"line_number":284,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_25186f1d","line":281,"updated":"2014-10-26 07:39:56.000000000","message":"since you\u0027ve removed the try, this comment no longer applies here.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        except Exception:"},{"line_number":279,"context_line":"            etype, value, trace \u003d sys.exc_info()"},{"line_number":280,"context_line":"            LOG.info(\"%s in resource setup. Invoking tearDownClass.\" % etype)"},{"line_number":281,"context_line":"            # Catch any exception in tearDown so we can re-raise the original"},{"line_number":282,"context_line":"            # exception at the end"},{"line_number":283,"context_line":"            cls.tearDownClass()"},{"line_number":284,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_03935950","line":281,"in_reply_to":"9aa7fdbe_25186f1d","updated":"2014-10-27 11:43:20.000000000","message":"Nice catch, thanks","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            super(BaseTestCase, cls).tearDownClass()"},{"line_number":294,"context_line":"        while cls.teardowns:"},{"line_number":295,"context_line":"            name, teardown \u003d cls.teardowns.pop()"},{"line_number":296,"context_line":"            try:"},{"line_number":297,"context_line":"                teardown()"},{"line_number":298,"context_line":"            except Exception as te:"},{"line_number":299,"context_line":"                LOG.exception(\"teardown of %s failed: %s\" % (name, te))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_057b6b28","line":296,"updated":"2014-10-26 07:39:56.000000000","message":"comment from L281 might apply here","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            super(BaseTestCase, cls).tearDownClass()"},{"line_number":294,"context_line":"        while cls.teardowns:"},{"line_number":295,"context_line":"            name, teardown \u003d cls.teardowns.pop()"},{"line_number":296,"context_line":"            try:"},{"line_number":297,"context_line":"                teardown()"},{"line_number":298,"context_line":"            except Exception as te:"},{"line_number":299,"context_line":"                LOG.exception(\"teardown of %s failed: %s\" % (name, te))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_4399e16c","line":296,"in_reply_to":"9aa7fdbe_057b6b28","updated":"2014-10-27 11:43:20.000000000","message":"ditto","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        \"\"\"Class level skip checks. Subclasses verify in here all"},{"line_number":315,"context_line":"        conditions that might prevent the execution of the entire test class."},{"line_number":316,"context_line":"        Checks that rely on credentials and/or resources can be done in the"},{"line_number":317,"context_line":"        `port_resources_hook`."},{"line_number":318,"context_line":"        \"\"\""},{"line_number":319,"context_line":"        pass"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_4571f342","line":317,"updated":"2014-10-26 07:39:56.000000000","message":"s/port/post","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        \"\"\"Class level skip checks. Subclasses verify in here all"},{"line_number":315,"context_line":"        conditions that might prevent the execution of the entire test class."},{"line_number":316,"context_line":"        Checks that rely on credentials and/or resources can be done in the"},{"line_number":317,"context_line":"        `port_resources_hook`."},{"line_number":318,"context_line":"        \"\"\""},{"line_number":319,"context_line":"        pass"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_83a669ac","line":317,"in_reply_to":"9aa7fdbe_4571f342","updated":"2014-10-27 11:43:20.000000000","message":"well spotted :)","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"14000ae20a1fa262777b9413fba45b1f3a7beaaa","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        pass"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    @classmethod"},{"line_number":322,"context_line":"    def pre_setup_hook(cls):"},{"line_number":323,"context_line":"        \"\"\"Hook for code to be executed before credentials and resource"},{"line_number":324,"context_line":"        allocation."},{"line_number":325,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_b72e31f9","line":322,"updated":"2014-10-28 01:02:07.000000000","message":"To avoid attribute error in resource_cleanup, we need to have hasattr() check. For each class variable which is being used in resource_cleanup() needs a separate hasatrr() check. IMO this is not optimized/proper way.\n\nAnother way -\nTo have pre defined class variable with empty/None value. and then let resource_setup() to do their proper assignment. Later resource_cleanup() can use those for cleanup as per need without any hasattr() check.\n\nIf above approach looks fine then, can we do that in this function or some other function something like initialization_list (kinda c++ term) ?","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"02d67f12264e2c081a4b148bb108f094971377c4","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        pass"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    @classmethod"},{"line_number":322,"context_line":"    def pre_setup_hook(cls):"},{"line_number":323,"context_line":"        \"\"\"Hook for code to be executed before credentials and resource"},{"line_number":324,"context_line":"        allocation."},{"line_number":325,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8c0949_d8364903","line":322,"in_reply_to":"9aa7fdbe_5cf1a069","updated":"2014-10-31 04:18:53.000000000","message":"I like your idea by having resource in stack which needs to be cleaned up and do actual cleanup in base class.\n\nI am ok with doing it in next step. If so then, i think we should not remove L277 otherwise attribute error will show again.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f3b8e468da2ce4e0a5119f37456ab4dc40f5dec5","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        pass"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    @classmethod"},{"line_number":322,"context_line":"    def pre_setup_hook(cls):"},{"line_number":323,"context_line":"        \"\"\"Hook for code to be executed before credentials and resource"},{"line_number":324,"context_line":"        allocation."},{"line_number":325,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_5cf1a069","line":322,"in_reply_to":"9aa7fdbe_b72e31f9","updated":"2014-10-28 10:15:42.000000000","message":"Yes I agree - I think eventually the resource_cleanup should be implemented in this base class only.\n\nWe could migrate to using something like testresources, where we every resource has a cleanup method available, and all resources are added into a stack. \n\nAlternatively we could provide something like an `addClassCleanup` which would behave similar to the addCleanup, but with the stack consumed during the resource_cleanup.\n\nMy initial thought on this was to do it as a next step, but if folks vote for doing as part of this bp I\u0027m ok with that.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"36abd1b66c26df7d4edd8eafce9d47853bfbf4ea","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_85967b3d","line":355,"updated":"2014-10-26 07:39:56.000000000","message":"why no \"pre_teawrdown_hook\"?","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"108481167eb7790d60f4b6d1bcd51b28d0aa2282","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_b6f1e996","line":355,"in_reply_to":"9aa7fdbe_230bfd8e","updated":"2014-10-27 12:20:13.000000000","message":"well, it seems like it\u0027s a 3 line addition that won\u0027t bother us unless it would be used, but would be a bother to add later down the road","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f3b8e468da2ce4e0a5119f37456ab4dc40f5dec5","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_9c9ea805","line":355,"in_reply_to":"9aa7fdbe_77768907","updated":"2014-10-28 10:15:42.000000000","message":"OK we can leave it has it is now. If during migration we find the need for additional hooks we can still add them.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"f14085c04b1f439fec2c5f63bae41cd2fd36757a","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_230bfd8e","line":355,"in_reply_to":"9aa7fdbe_85967b3d","updated":"2014-10-27 11:43:20.000000000","message":"In fact I\u0027m not quite sure a post_teardown_hook is really required...","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"75b1ad694dca95845019d9de1fad8e862f0c4ca3","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a8c0949_c674a69e","line":355,"in_reply_to":"9aa7fdbe_9c9ea805","updated":"2014-10-31 07:42:02.000000000","message":"I agree. We should have a clear reason to have such a method.","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"14000ae20a1fa262777b9413fba45b1f3a7beaaa","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def post_teardown_hook(cls):"},{"line_number":353,"context_line":"        \"\"\"Hook to run any code after the cleanup is completed.\"\"\""},{"line_number":354,"context_line":"        pass"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    def setUp(self):"},{"line_number":357,"context_line":"        super(BaseTestCase, self).setUp()"},{"line_number":358,"context_line":"        if not self.setUpClassCalled:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aa7fdbe_77768907","line":355,"in_reply_to":"9aa7fdbe_b6f1e996","updated":"2014-10-28 01:02:07.000000000","message":"IMO we do not need pre_teardown_hook().  \n\nI think pre_setup_hook(cls) should have only those code which should not require to be cleaned up explicitly. for example - class variable, getting conf value, instantiate client manager etc. \n\nor scope of pre_setup_hook(cls) is something more?","commit_id":"15208e60e0f109844adda520a7ca1e11d8e24d88"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"fc08362d274442363ca9251b30e12615b172f09f","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                # TODO(gmann): Till we split-up resource_setup \u0026"},{"line_number":275,"context_line":"                # resource_cleanup in more structural way, log"},{"line_number":276,"context_line":"                # AttributeError as info instead of exception."},{"line_number":277,"context_line":"                if tetype is AttributeError:"},{"line_number":278,"context_line":"                    LOG.info(\"tearDownClass failed: %s\" % te)"},{"line_number":279,"context_line":"                else:"},{"line_number":280,"context_line":"                    LOG.exception(\"tearDownClass failed: %s\" % te)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_8f03ac72","side":"PARENT","line":277,"updated":"2014-11-10 05:27:38.000000000","message":"should we keep this till your idea of having cleanup resources in stack and then clean those in base class?\n\nI am just concern about Attribute Error which will start showing up again in logs.","commit_id":"6fe06450c4b715e27e947dba5911b20ad24b8249"},{"author":{"_account_id":8859,"name":"Daisuke Morita","email":"morita.daisuke@ntti3.com","username":"morrisson"},"change_message_id":"c0ddac39bb0bf8195ea0f4a1eab09b25b47dfda9","unresolved":false,"context_lines":[{"line_number":255,"context_line":"    Tear-down is also split in a series of steps (teardown stages), which are"},{"line_number":256,"context_line":"    stacked for execution only if the corresponding setup stage had been"},{"line_number":257,"context_line":"    reached during the setup phase. Tear-down stages are:"},{"line_number":258,"context_line":"    - clear_isolated_creds (defined in the base test class)"},{"line_number":259,"context_line":"    - resource_cleanup"},{"line_number":260,"context_line":"    - post_teardown_hook"},{"line_number":261,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a890539_8bba6021","line":258,"updated":"2014-11-13 09:35:18.000000000","message":"Each credentialsProvider sub-class has clear_isolated_creds method so I think we can avoid duplication among projects\u0027 base test classes by defining class method as follows:\n\n@classmedhod\ndef clear_isolated_creds(cls):\n    cls.cred_provider.clear_isolated_creds()\n\n\nCan we suppose the case where two or more kinds of credentialsProvider are frequently used during running Tempest tests? If so, your code is better.\n\n\nThe above is just my suggestion. I do not think you should change the code like the above in this patch because it just increases your burden, but I would like to hear your feeling about above idea.","commit_id":"83471ec15cbe2d9a770b5becbc3fb4d335687558"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d544bb1c7f8b343c736718b127210fb662645009","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # All checks that may generate a skip"},{"line_number":274,"context_line":"            cls.skip_checks()"},{"line_number":275,"context_line":"            # Additional setup code that does not require a teardown"},{"line_number":276,"context_line":"            cls.pre_setup_hook()"},{"line_number":277,"context_line":"            # Additional class-wide test resources"},{"line_number":278,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":279,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_b0f31e9e","line":276,"updated":"2014-12-09 21:00:45.000000000","message":"Why is this needed? I saw it as useful on previous revs as a useful injection point before anything got run, but now I think it could just be part of resource_setup() especially if it doesn\u0027t require additional teardowns.","commit_id":"ff274ec940009603ae911630847eb447e869bf75"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e1ba929e586f210e8db60100bb10dceed186711a","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            # All checks that may generate a skip"},{"line_number":274,"context_line":"            cls.skip_checks()"},{"line_number":275,"context_line":"            # Additional setup code that does not require a teardown"},{"line_number":276,"context_line":"            cls.pre_setup_hook()"},{"line_number":277,"context_line":"            # Additional class-wide test resources"},{"line_number":278,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":279,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_8bca774d","line":276,"in_reply_to":"3a961159_b0f31e9e","updated":"2014-12-09 21:31:53.000000000","message":"Done","commit_id":"ff274ec940009603ae911630847eb447e869bf75"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"d544bb1c7f8b343c736718b127210fb662645009","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            except Exception as te:"},{"line_number":309,"context_line":"                LOG.exception(\"teardown of %s failed: %s\" % (name, te))"},{"line_number":310,"context_line":"                if not etype:"},{"line_number":311,"context_line":"                    etype, value, trace \u003d sys.exc_info()"},{"line_number":312,"context_line":"        # If exceptions were raised during teardown, an not before, re-raise"},{"line_number":313,"context_line":"        # the first one"},{"line_number":314,"context_line":"        if re_raise:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_50367a53","line":311,"updated":"2014-12-09 21:00:45.000000000","message":"I\u0027m confused by this bit why are we saving these, they don\u0027t look like they\u0027re ever used.","commit_id":"ff274ec940009603ae911630847eb447e869bf75"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"e1ba929e586f210e8db60100bb10dceed186711a","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            except Exception as te:"},{"line_number":309,"context_line":"                LOG.exception(\"teardown of %s failed: %s\" % (name, te))"},{"line_number":310,"context_line":"                if not etype:"},{"line_number":311,"context_line":"                    etype, value, trace \u003d sys.exc_info()"},{"line_number":312,"context_line":"        # If exceptions were raised during teardown, an not before, re-raise"},{"line_number":313,"context_line":"        # the first one"},{"line_number":314,"context_line":"        if re_raise:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_4bb16fe0","line":311,"in_reply_to":"3a961159_50367a53","updated":"2014-12-09 21:31:53.000000000","message":"good catch, L301 should be (etype is None)","commit_id":"ff274ec940009603ae911630847eb447e869bf75"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"63249adc18689c61350ac2721d3efbbf61a77ca7","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    etype, value, trace \u003d sys.exc_info()"},{"line_number":306,"context_line":"        # If exceptions were raised during teardown, an not before, re-raise"},{"line_number":307,"context_line":"        # the first one"},{"line_number":308,"context_line":"        if re_raise:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                raise etype(value), None, trace"},{"line_number":311,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_ddf3629d","line":308,"updated":"2014-12-09 22:03:10.000000000","message":"Shouldn\u0027t this be \u0027if re_raise and etype is not None\u0027 for the case where no teardowns fail?","commit_id":"83499116fd483c12620ed23819c9beda98e86dab"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c4b1822e11672410f192f613c6844bc4cd245972","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                    etype, value, trace \u003d sys.exc_info()"},{"line_number":306,"context_line":"        # If exceptions were raised during teardown, an not before, re-raise"},{"line_number":307,"context_line":"        # the first one"},{"line_number":308,"context_line":"        if re_raise:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                raise etype(value), None, trace"},{"line_number":311,"context_line":"            finally:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a961159_6009e5dc","line":308,"in_reply_to":"3a961159_ddf3629d","updated":"2014-12-09 22:24:31.000000000","message":"Done","commit_id":"83499116fd483c12620ed23819c9beda98e86dab"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"9bf45065192c59f81841253d4bd933cec7d3d8ca","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_4c3b429c","line":271,"updated":"2014-12-10 00:57:17.000000000","message":"Looks more organized but I did not get why skip_checks() is moved after cred and clients setup?","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"41abe30893c00be933b9945550eda6c33d41eacc","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_48732bb1","line":271,"updated":"2014-12-10 04:09:40.000000000","message":"So I\u0027m actually on the fence about this. I wasn\u0027t involved in the discussion which prompted moving it here, but I\u0027m not sure we have many skip decision which involve credentials. I also think most of them aren\u0027t really valid (with a few exceptions like host count for live migration) and are prone to inconsistent behavior in tempest.\n\nA skip can be a silent failure which is why we try to be explicit in the config file for most things even if they are poll-able. Otherwise we risk a broken api causing things to be skipped when the should fail. API skips can be very risky and I\u0027m not sure we want to set the precedence by saying we assume credentials are required for a skip, in doesn\u0027t seem to be in accordance with the other principles in tempest. \n\nThat being said I\u0027d be ok with this, but raising a skip exception here triggers the teardown code below (this is the correct behavior since creds were allocated and need to be cleaned), which will leave a log message based on below which might be excessive for every skip.(at least in it\u0027s current formatting it would be a debug I feel for a skip)","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"1fb0a11e221b18f27abb8335e0b74a56f2218793","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_eea04d45","line":271,"in_reply_to":"3a961159_48732bb1","updated":"2014-12-10 15:50:34.000000000","message":"If we are going to prohibit skipping based on the result of any api call then we should say so. I don\u0027t think the idea was that credentials should be required for a skip, but rather that credentials are required for a skip that wanted to do any api call. Another possibility is to have separate methods for skips that require api calls and those that do not.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"bc31fd74b53a89571f08378172d34a742ed857a5","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_b50929df","line":271,"in_reply_to":"3a961159_74bfcafb","updated":"2014-12-10 18:37:02.000000000","message":"So this is actually what I was talking about, I actually view all but potentially 1 (and boto, because I don\u0027t really care) as large bugs that should be fixed ASAP. They run the risk of preventing tempest from doing it\u0027s job correctly. Which echo\u0027s my earlier concern of providing a pre-provisioned path to do this will lead to more things slipping in.\n\n  * The admin credential check can and should be done based on credentials in config alone.\n  * The FloatingIPsBulkAdminTestJSON should fail if the pool isn\u0027t actually allocated\n  * VolumeTestJSON should fail if things couldn\u0027t be created, skipping seems insane\n  * L3AgentSchedulerTestJSON: that should definitely be a config option, although there might be a 1:1 mapping with an extension to avoid adding a new option\n * TestServerBasicOps This is the rare case where I think it could be warranted, we don\u0027t have a way to do this verification without calling out. That being said I think we could just treat this as a configuration error and fail instead of skipping, because that\u0027s what it is since the image and flavor are user specified.\n * Boto I don\u0027t really care, but I think this is probably wrong.\n\nI\u0027m fine with breaking this out into an etherpad, or better yet just file bugs for all of these cases.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1192,"name":"David Kranz","email":"dkranz@redhat.com","username":"david-kranz"},"change_message_id":"28546b11de01329554b5a76974c67c438c68f476","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_754501b2","line":271,"in_reply_to":"3a961159_b50929df","updated":"2014-12-10 18:48:14.000000000","message":"Yes, I agree. The boto thing is definitely wrong and was why I gave a -1 to a patch that tried to continue using that as a way to skip boto tests. We should have that but based on new service_available flags for s3 and ec2. So I\u0027m fine with just saying that if you need to do a api-call skip you can do it manually from resource_setup.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"a498c76955b694becd9036672a1c977379ca2610","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_74bfcafb","line":271,"in_reply_to":"3a961159_eea04d45","updated":"2014-12-10 17:57:48.000000000","message":"I don\u0027t think we can completely prohibit skipping based on an API call result. But it would be nice to have a quick skip with no resource set-up.\n\nSkips that require an API call usually do so because they want to verify whether the supplied configuration is valid / compatible with the cloud under test. \n\nI went through *all* the skips in tempest (it took a while) and I found the following exceptions to skips based on configuration only:\n- a few checks done at test level, so not relevant here\n- skips on InvalidConfiguration is admin credentials are missing: this can be written as a check from config only\n- FloatingIPsBulkAdminTestJSON: it checks if the configured floating IP pool is actually not allocated\n- VolumesTestJSON: it skips if not all resources could be created\n- L3AgentSchedulerTestJSON: skips if no L3 agent is found. This could be converted in a config flag\n- TestServerBasicOps: checks if configured image is compatible with configured flavour\n- All boto tests: decision_maker performs several checks done before running any tests, some of them are config related, some require API calls\n\nSo I lean towards the following approach:\n- document the above somewhere in the etherpad or even as comments in the above\n- put the skip_checks back out of try before any resource setup. I could rename that as configuration_checks even\n- checks related to whether it is possible or not to setup resources should go in the resource_setup directly\n- we could have something like a cloud_check which performs API calls to verify the cloud (and its resources) are suitable for running a class of tests (which is what boto test do), but maybe that\u0027s actually discovery and it should be coded instead as configuration?","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"4557dbebd527c521191af9543fe155bdc0b053cd","unresolved":false,"context_lines":[{"line_number":268,"context_line":"            # Shortcuts to clients"},{"line_number":269,"context_line":"            cls.setup_clients()"},{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_4ff4fb86","line":271,"in_reply_to":"3a961159_eea04d45","updated":"2014-12-10 16:41:19.000000000","message":"It\u0027s not a 100% prohibition against API calls deciding skips (maybe 99% :) ) because there are times when it\u0027s needed, but it\u0027s very rare and honestly I doubt there are any new cases would come in where it\u0027s needed. But, it\u0027s very strongly discouraged, and we do document it, it\u0027s all over the tempest docs.\n\nThe more I think about this, I don\u0027t think it\u0027s correct to have any accommodations in the class level fixtures for using api calls to determine a skip. We should leave it as a manual per test step, to make it clear what\u0027s being done.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"41abe30893c00be933b9945550eda6c33d41eacc","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"},{"line_number":275,"context_line":"        except Exception:"},{"line_number":276,"context_line":"            etype, value, trace \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_c8163bf1","line":273,"updated":"2014-12-10 04:09:40.000000000","message":"So putting this above while I think is correct to ensure we do a cleanup for a partially run resource_setup will bring back the attribute errors which are very confusing:\n\nhttp://logs.openstack.org/53/115353/14/check/check-tempest-dsvm-full/b27ffe9/logs/tempest.txt.gz#_2014-12-09_22_40_14_111\n\nI think we should still have the hack in the short term to mask these. While we work through refactoring the individual usages of resource_setup() and resource_cleanup() in the follow-on patches we should clean those up to make sure we don\u0027t hit them.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"deb231b6dd5fa1552e829f6566591e594444202a","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"},{"line_number":275,"context_line":"        except Exception:"},{"line_number":276,"context_line":"            etype, value, trace \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_5f473fbc","line":273,"in_reply_to":"3a961159_6878e7c4","updated":"2014-12-10 21:40:26.000000000","message":"ok","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"70e8220f7437bee5e29977332d3af3d8af83caab","unresolved":false,"context_lines":[{"line_number":270,"context_line":"            # All checks that may generate a skip"},{"line_number":271,"context_line":"            cls.skip_checks()"},{"line_number":272,"context_line":"            # Additional class-wide test resources"},{"line_number":273,"context_line":"            cls.teardowns.append((\u0027resources\u0027, cls.resource_cleanup))"},{"line_number":274,"context_line":"            cls.resource_setup()"},{"line_number":275,"context_line":"        except Exception:"},{"line_number":276,"context_line":"            etype, value, trace \u003d sys.exc_info()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_6878e7c4","line":273,"in_reply_to":"3a961159_c8163bf1","updated":"2014-12-10 05:14:52.000000000","message":"I agree about still having hack for attribute errors as those will start coming up. \n\nIn future, to get rid of attribute error I like Andrea\u0027s idea of populating some stack in concrete resource_setup and do the actual cleanup in base class only.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"41abe30893c00be933b9945550eda6c33d41eacc","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            cls.resource_setup()"},{"line_number":275,"context_line":"        except Exception:"},{"line_number":276,"context_line":"            etype, value, trace \u003d sys.exc_info()"},{"line_number":277,"context_line":"            LOG.info(\"%s in setUpClass. Invoking tearDownClass.\" % etype)"},{"line_number":278,"context_line":"            cls.tearDownClass()"},{"line_number":279,"context_line":"            try:"},{"line_number":280,"context_line":"                raise etype(value), None, trace"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_287edf6b","line":277,"updated":"2014-12-10 04:09:40.000000000","message":"I think we should print the class name here too, otherwise this is just noise that isn\u0027t useful for debugging. Is this really info, or should it be at warn? It feels like something went wrong but wasn\u0027t fatal, which IIRC is what warn is for.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"deb231b6dd5fa1552e829f6566591e594444202a","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            cls.resource_setup()"},{"line_number":275,"context_line":"        except Exception:"},{"line_number":276,"context_line":"            etype, value, trace \u003d sys.exc_info()"},{"line_number":277,"context_line":"            LOG.info(\"%s in setUpClass. Invoking tearDownClass.\" % etype)"},{"line_number":278,"context_line":"            cls.tearDownClass()"},{"line_number":279,"context_line":"            try:"},{"line_number":280,"context_line":"                raise etype(value), None, trace"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_3f3ef328","line":277,"in_reply_to":"3a961159_287edf6b","updated":"2014-12-10 21:40:26.000000000","message":"ok","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"41abe30893c00be933b9945550eda6c33d41eacc","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # the first one"},{"line_number":308,"context_line":"        if re_raise and etype is not None:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                raise etype(value), None, trace"},{"line_number":311,"context_line":"            finally:"},{"line_number":312,"context_line":"                del trace"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_c819db7a","line":310,"updated":"2014-12-10 04:09:40.000000000","message":"I\u0027m curious about the syntax here, from what I read in the python docs:\n\n  raise etype, value, trace\n\nshould work fine, but I\u0027m not really familiar enough with this to weigh on one vs the other.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"deb231b6dd5fa1552e829f6566591e594444202a","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # the first one"},{"line_number":308,"context_line":"        if re_raise and etype is not None:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                raise etype(value), None, trace"},{"line_number":311,"context_line":"            finally:"},{"line_number":312,"context_line":"                del trace"},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_1f4137a9","line":310,"in_reply_to":"3a961159_c819db7a","updated":"2014-12-10 21:40:26.000000000","message":"It\u0027s just a cppy-paste from what was there before.\n\nAccording to https://www.python.org/dev/peps/pep-3109/ in python 2 raise E, V and raise E(V) are identical.\nraise E(V), None, T is not considered as an option even.\n\nIn python 3 neither of the above is supported.\nI will change it to raise etype, value, trace.","commit_id":"2778813fd8895cf769f39902282920f2cfc8cddc"}]}
