)]}'
{"specs/resource-cleanup.rst":[{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"a28708d2a6541d405a75c55ab46b9be3ee69b76b","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"PoC for this is available here: https://review.openstack.org/#/c/115353."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The tearDown fixture requireis fixing in several places, because"},{"line_number":73,"context_line":"several tearDownClass implementation would become unsafe, as they expect"},{"line_number":74,"context_line":"attributes defined during setUpClass, which may not be there anymore."},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa98f980_1ecd5cb7","line":72,"updated":"2014-09-05 05:32:04.000000000","message":"s/requireis/requires ?","commit_id":"76232fa0a5032f85bb4665c7dd2e80eae38b1d80"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"a28708d2a6541d405a75c55ab46b9be3ee69b76b","unresolved":false,"context_lines":[{"line_number":97,"context_line":"--------------------------"},{"line_number":98,"context_line":"Decorate all ``setUpClass`` implementation with ``@safe_setup`` and all"},{"line_number":99,"context_line":"``tearDownClass`` implementation with ``@safe_teardown``."},{"line_number":100,"context_line":"This appraoch requires a mass change to tempest, which as the benefit of"},{"line_number":101,"context_line":"being almost scriptable (PoC: https://review.openstack.org/#/c/115123/)."},{"line_number":102,"context_line":"It has the downfall of requiring every new test class to add those two"},{"line_number":103,"context_line":"decorators."}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa98f980_5e49a42f","line":100,"updated":"2014-09-05 05:32:04.000000000","message":"s/appraoch/approach","commit_id":"76232fa0a5032f85bb4665c7dd2e80eae38b1d80"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"a28708d2a6541d405a75c55ab46b9be3ee69b76b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"----------"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"- Define base fixtures"},{"line_number":126,"context_line":"- Migrate base classes and tests two use the new framework (multiple patches)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"Dependencies"},{"line_number":129,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa98f980_7e190821","line":126,"updated":"2014-09-05 05:32:04.000000000","message":"Should we have a hacking rule for checking adding @safe_setup/@safe_teardown for every test cases?","commit_id":"76232fa0a5032f85bb4665c7dd2e80eae38b1d80"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"3a2a5e8e5572b436059684b7cfd0e3e4b361ce1b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"----------"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"- Define base fixtures"},{"line_number":126,"context_line":"- Migrate base classes and tests two use the new framework (multiple patches)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"Dependencies"},{"line_number":129,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa98f980_5166e7bb","line":126,"in_reply_to":"fa98f980_7e190821","updated":"2014-09-05 14:51:08.000000000","message":"That would be an alternative solution - the idea of splitting setUpClass and tearDownClass into parts is so that @safe_setup and @safe_teardown are only required in the root test base class.\nIf we go for the solution I proposed, we\u0027ll need hacking rules to prevent overriding setUpClass and tearDownClass.","commit_id":"76232fa0a5032f85bb4665c7dd2e80eae38b1d80"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"41d19a7d53330cb7b7fc46e002aaa67290be5dd2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The cleanup/release of test resources created/allocated in the class level"},{"line_number":21,"context_line":"test fixtures is invoked in the class level tearDown fixure."},{"line_number":22,"context_line":"However tearDownClass is invoked by the unittest framework only in case"},{"line_number":23,"context_line":"setUpClass is successful. This is causing resources being leaked when:"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_2c708cdb","line":21,"updated":"2014-09-11 09:26:19.000000000","message":"nit: s/fixure/fixture","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"99728d885b3c0f37c8f8c8a73b7dbb072d7cdab9","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"The cleanup/release of test resources created/allocated in the class level"},{"line_number":21,"context_line":"test fixtures is invoked in the class level tearDown fixure."},{"line_number":22,"context_line":"However tearDownClass is invoked by the unittest framework only in case"},{"line_number":23,"context_line":"setUpClass is successful. This is causing resources being leaked when:"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_53972b90","line":21,"in_reply_to":"fa98f980_2c708cdb","updated":"2014-09-11 12:07:24.000000000","message":"Done","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"663cf623208a0456968a8ab59f65c626e273fd24","unresolved":false,"context_lines":[{"line_number":86,"context_line":"This approach requires a mass change to tempest, which as the benefit of"},{"line_number":87,"context_line":"being almost scriptable (PoC: https://review.openstack.org/#/c/115123/)."},{"line_number":88,"context_line":"It has the downfall of requiring every new test class to add those two"},{"line_number":89,"context_line":"decorators."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"Migrate to TestResources"},{"line_number":92,"context_line":"------------------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_c9a3e74d","line":89,"updated":"2014-09-08 06:04:34.000000000","message":"Amount of changes required may be kind of equal but i also agree with other downfall (for new tests).","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"663cf623208a0456968a8ab59f65c626e273fd24","unresolved":false,"context_lines":[{"line_number":97,"context_line":"--------"},{"line_number":98,"context_line":"While doing this change, an extra benefit could be gained by structuring"},{"line_number":99,"context_line":"the setup in a series of methods, to enforce the least possible resource"},{"line_number":100,"context_line":"allocation before failure and thus quick cleanup as well."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"PoC for this is available here: https://review.openstack.org/#/c/115353."},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_46a60455","line":100,"updated":"2014-09-08 06:04:34.000000000","message":"Yes, one example can be-  by making safe_setup(f) little bit smart not to run tearDownClass if setUpClass is skipped.\nSomething like- \n\n-Have cls.skipped variable in BaseTestCase which can be false by default and override by concrete test class in skip-check method.\n- In safe_setup(f) decorator we can bypass cls.tearDownClass () call based on cls.skipped variable.\n\nSo IMO, this can be included in main proposed changes instead of \"Optional\".","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"99728d885b3c0f37c8f8c8a73b7dbb072d7cdab9","unresolved":false,"context_lines":[{"line_number":97,"context_line":"--------"},{"line_number":98,"context_line":"While doing this change, an extra benefit could be gained by structuring"},{"line_number":99,"context_line":"the setup in a series of methods, to enforce the least possible resource"},{"line_number":100,"context_line":"allocation before failure and thus quick cleanup as well."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"PoC for this is available here: https://review.openstack.org/#/c/115353."},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_73ad0fe9","line":100,"in_reply_to":"fa98f980_46a60455","updated":"2014-09-11 12:07:24.000000000","message":"In several cases the setUpClass is only run partially, so the tearDwonClass is needed, but only parts of it would work.\nThe most relevant example is credentials allocated before the skip checks are done. So skipping the tearDownClass would imply not releasing the credentials.\nTo have this working we would have to split the setUpClass in sections, as per https://review.openstack.org/#/c/115353. I agree with David comment on this that the importance of this kind of work is secondary to the main objective of this bp. \nI may write a new spec for this work once this bp is done.","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"663cf623208a0456968a8ab59f65c626e273fd24","unresolved":false,"context_lines":[{"line_number":118,"context_line":"----------"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"- Define base fixtures"},{"line_number":121,"context_line":"- Migrate base classes and tests two use the new framework (multiple patches)"},{"line_number":122,"context_line":"- Hacking rule to prevent overriding of setUpClass and tearDownClass"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_897d5fea","line":121,"updated":"2014-09-08 06:04:34.000000000","message":"two-\u003eto\n\nAs this needed to be implemented in multiple patches may be based on directories/component, it will be better to have etherpad/google doc to track/sync those.","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"99728d885b3c0f37c8f8c8a73b7dbb072d7cdab9","unresolved":false,"context_lines":[{"line_number":118,"context_line":"----------"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"- Define base fixtures"},{"line_number":121,"context_line":"- Migrate base classes and tests two use the new framework (multiple patches)"},{"line_number":122,"context_line":"- Hacking rule to prevent overriding of setUpClass and tearDownClass"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":3,"id":"fa98f980_137a0377","line":121,"in_reply_to":"fa98f980_897d5fea","updated":"2014-09-11 12:07:24.000000000","message":"ok","commit_id":"7f400aaddc49d91ba97da568f541621c4acde34f"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"Proposed change"},{"line_number":36,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Disallow overriding ``setUpClass`` defined in ``BaseTestCase``. Define"},{"line_number":39,"context_line":"``setUpClass`` so that it calls one (or more) other methods to be overridden"},{"line_number":40,"context_line":"by descendants. Decorate it with the ``@safe_setup`` decorator."},{"line_number":41,"context_line":"This way tearDownClass will always be invoked."}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_d3beb8ad","line":38,"updated":"2014-09-11 14:02:15.000000000","message":"You should probably mention this is via a hacking rule and not in code enforcement.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"597fd4dbeb23fb9360c669af7e51c5fa836eefbd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"Proposed change"},{"line_number":36,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Disallow overriding ``setUpClass`` defined in ``BaseTestCase``. Define"},{"line_number":39,"context_line":"``setUpClass`` so that it calls one (or more) other methods to be overridden"},{"line_number":40,"context_line":"by descendants. Decorate it with the ``@safe_setup`` decorator."},{"line_number":41,"context_line":"This way tearDownClass will always be invoked."}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_64cf0080","line":38,"in_reply_to":"fa98f980_d3beb8ad","updated":"2014-09-11 16:42:16.000000000","message":"Good idea, yes","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    @classmethod"},{"line_number":46,"context_line":"    @safe_setup"},{"line_number":47,"context_line":"    def setUpClass(cls):"},{"line_number":48,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027setUpClass\u0027):"},{"line_number":49,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":50,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":51,"context_line":"        cls.setup_class()"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_d0f6ae5c","line":48,"updated":"2014-09-11 14:02:15.000000000","message":"Won\u0027t this always be true?","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"597fd4dbeb23fb9360c669af7e51c5fa836eefbd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    @classmethod"},{"line_number":46,"context_line":"    @safe_setup"},{"line_number":47,"context_line":"    def setUpClass(cls):"},{"line_number":48,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027setUpClass\u0027):"},{"line_number":49,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":50,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":51,"context_line":"        cls.setup_class()"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_e45f70e3","line":48,"in_reply_to":"fa98f980_d0f6ae5c","updated":"2014-09-11 16:42:16.000000000","message":"I guess so - this is the existing code, so I didn\u0027t care about changing it.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027setUpClass\u0027):"},{"line_number":49,"context_line":"            super(BaseTestCase, cls).setUpClass()"},{"line_number":50,"context_line":"        cls.setUpClassCalled \u003d True"},{"line_number":51,"context_line":"        cls.setup_class()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":".."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_33c8e4a7","line":51,"updated":"2014-09-11 14:02:15.000000000","message":"I think having a distinct name might be useful here. We probably don\u0027t want to overload terms too much.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"The tearDown fixture requires fixing in several places, because"},{"line_number":57,"context_line":"several tearDownClass implementation would become unsafe, as they expect"},{"line_number":58,"context_line":"attributes defined during setUpClass, which may not be there anymore."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Disallow overriding ``tearDownClass`` defined in ``BaseTestCase``."},{"line_number":61,"context_line":"Define ``tearDownClass`` so that it invokes a descendant specifc cleanup"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_93499033","line":58,"updated":"2014-09-11 14:02:15.000000000","message":"We should be using addCleanup instead of tearDown anyway because tearDown doesn\u0027t get called if the test fails. But, regardless of that, I agree things should be able to handle non-existent resources.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"597fd4dbeb23fb9360c669af7e51c5fa836eefbd","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"The tearDown fixture requires fixing in several places, because"},{"line_number":57,"context_line":"several tearDownClass implementation would become unsafe, as they expect"},{"line_number":58,"context_line":"attributes defined during setUpClass, which may not be there anymore."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Disallow overriding ``tearDownClass`` defined in ``BaseTestCase``."},{"line_number":61,"context_line":"Define ``tearDownClass`` so that it invokes a descendant specifc cleanup"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_44859c05","line":58,"in_reply_to":"fa98f980_93499033","updated":"2014-09-11 16:42:16.000000000","message":"Yes that should say tearDownClass fixture. I would not touch test level fixtures as part of this bp.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"several tearDownClass implementation would become unsafe, as they expect"},{"line_number":58,"context_line":"attributes defined during setUpClass, which may not be there anymore."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"Disallow overriding ``tearDownClass`` defined in ``BaseTestCase``."},{"line_number":61,"context_line":"Define ``tearDownClass`` so that it invokes a descendant specifc cleanup"},{"line_number":62,"context_line":"code, and finally cleanup credentials."},{"line_number":63,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_13bda0b7","line":60,"updated":"2014-09-11 14:02:15.000000000","message":"You should probably mention this is via a hacking rule","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def tearDownClass(cls):"},{"line_number":68,"context_line":"        at_exit_set.discard(cls)"},{"line_number":69,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027tearDownClass\u0027):"},{"line_number":70,"context_line":"            super(BaseTestCase, cls).tearDownClass()"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            cls.teardown_class()"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_b0904aee","line":69,"updated":"2014-09-11 14:02:15.000000000","message":"Won\u0027t this always be true?","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        if hasattr(super(BaseTestCase, cls), \u0027tearDownClass\u0027):"},{"line_number":70,"context_line":"            super(BaseTestCase, cls).tearDownClass()"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            cls.teardown_class()"},{"line_number":73,"context_line":"        finally:"},{"line_number":74,"context_line":"            cls._cleanup_credentials() # Defined in BaseTestCase"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_50b9de77","line":72,"updated":"2014-09-11 14:02:15.000000000","message":"Maybe a slightly different name would be a bit clearer. Like clean_up_resources().","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":82,"context_line":"Massive fixture decoration"},{"line_number":83,"context_line":"--------------------------"},{"line_number":84,"context_line":"Decorate all ``setUpClass`` implementation with ``@safe_setup`` and all"},{"line_number":85,"context_line":"``tearDownClass`` implementation with ``@safe_teardown``."},{"line_number":86,"context_line":"This approach requires a mass change to tempest, which as the benefit of"},{"line_number":87,"context_line":"being almost scriptable (PoC: https://review.openstack.org/#/c/115123/)."},{"line_number":88,"context_line":"It has the downfall of requiring every new test class to add those two"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_9370b073","line":85,"updated":"2014-09-11 14:02:15.000000000","message":"I don\u0027t think we\u0027d need a safe_teardown, if we were going to insist that tearDownClass was always run we\u0027d need to make the methods called in it not assume that the tests ran.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":91,"context_line":"Migrate to TestResources"},{"line_number":92,"context_line":"------------------------"},{"line_number":93,"context_line":"This may still be an option on the long term, but at the moment the"},{"line_number":94,"context_line":"effort of the migration would be more than the benefit from it."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Optional"},{"line_number":97,"context_line":"--------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_3397043c","line":94,"updated":"2014-09-11 14:02:15.000000000","message":"To be fair testresources would work for only a subset of what\u0027s being proposed here, it would be used to replace the shared resource allocation in setUpClass.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"85ddb88b40aa8a1864f75847ed24012dfba335dd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"--------"},{"line_number":98,"context_line":"While doing this change, an extra benefit could be gained by structuring"},{"line_number":99,"context_line":"the setup in a series of methods, to enforce the least possible resource"},{"line_number":100,"context_line":"allocation before failure and thus quick cleanup as well."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"PoC for this is available here: https://review.openstack.org/#/c/115353."},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_3380e4f6","line":100,"updated":"2014-09-11 14:02:15.000000000","message":"I\u0027m not sure this should be an optional part of this spec. I think doing this is one of the key advantages of the approach proposed here, making the setup and teardown staged makes things a bit simpler to follow. While just using a separate method to handle class setup should avoid the leaks described in the problem description I think we should make things a bit cleaner at the same time.\n\nFor example splitting the skip logic, credential allocation and client init into separate stages I think should be mandatory. This will also allow us to make the safe_setup decorator a bit smarter and not need to handle skip exceptions because they should happen before resource allocation. (at least I\u0027m assuming that\u0027ll be the case) \n\nI\u0027m fine with staging it so we do a first pass straight migration and then follow up with moving to the staged approach.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"597fd4dbeb23fb9360c669af7e51c5fa836eefbd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"--------"},{"line_number":98,"context_line":"While doing this change, an extra benefit could be gained by structuring"},{"line_number":99,"context_line":"the setup in a series of methods, to enforce the least possible resource"},{"line_number":100,"context_line":"allocation before failure and thus quick cleanup as well."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"PoC for this is available here: https://review.openstack.org/#/c/115353."},{"line_number":103,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"fa98f980_85cf7e55","line":100,"in_reply_to":"fa98f980_3380e4f6","updated":"2014-09-11 16:42:16.000000000","message":"OK I\u0027ll put it back where it was - the two steps approach sounds good.","commit_id":"b25c84ded1600342800089d4ab1ef8c355be7450"}]}
